Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single Test Failure possibly due Locale. #1006

Closed
AdamSpeight2008 opened this issue Mar 4, 2015 · 5 comments · Fixed by #1889
Closed

Single Test Failure possibly due Locale. #1006

AdamSpeight2008 opened this issue Mar 4, 2015 · 5 comments · Fixed by #1889
Assignees
Labels
Area-Analyzers Bug Tenet-Localization Some piece of UI isn’t localized, often due to hard-coding of strings or other visible elements. Test Test failures in roslyn-CI Verified
Milestone

Comments

@AdamSpeight2008
Copy link
Contributor

This the second time I've encountered this single test failure.

      <test name="Microsoft.CodeAnalysis.UnitTests.Diagnostics.DiagnosticLocalizationTests.TestDiagnosticLocalization" type="Microsoft.CodeAnalysis.UnitTests.Diagnostics.DiagnosticLocalizationTests" method="TestDiagnosticLocalization" time="0.031" result="Fail">
        <failure exception-type="System.Collections.Generic.KeyNotFoundException">
          <message><![CDATA[System.Collections.Generic.KeyNotFoundException : The given key was not present in the dictionary.]]></message>
          <stack-trace><![CDATA[   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Microsoft.CodeAnalysis.UnitTests.Diagnostics.DiagnosticLocalizationTests.CustomResourceManager.GetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) in C:\Users\Adam\Documents\GitHub\roslyn\Src\Compilers\Core\CodeAnalysisTest\Diagnostics\DiagnosticLocalizationTests.cs:line 183
   at Microsoft.CodeAnalysis.UnitTests.Diagnostics.DiagnosticLocalizationTests.CustomResourceManager.GetString(String name, CultureInfo culture) in C:\Users\Adam\Documents\GitHub\roslyn\Src\Compilers\Core\CodeAnalysisTest\Diagnostics\DiagnosticLocalizationTests.cs:line 178
   at Microsoft.CodeAnalysis.LocalizableResourceString.ToString(IFormatProvider formatProvider) in C:\Users\Adam\Documents\GitHub\roslyn\Src\Compilers\Core\Portable\Diagnostic\LocalizableResourceString.cs:line 111
   at Microsoft.CodeAnalysis.LocalizableString.ToString() in C:\Users\Adam\Documents\GitHub\roslyn\Src\Compilers\Core\Portable\Diagnostic\LocalizableString.cs:line 32
   at Microsoft.CodeAnalysis.UnitTests.Diagnostics.DiagnosticLocalizationTests.TestDiagnosticLocalization() in C:\Users\Adam\Documents\GitHub\roslyn\Src\Compilers\Core\CodeAnalysisTest\Diagnostics\DiagnosticLocalizationTests.cs:line 67]]></stack-trace>
        </failure>
      </test>

if I build via jerkins no failures.

I think it was introduced somewhere between #958 (no failures) and #1001 (1 failure)

@mavasani
Copy link
Contributor

mavasani commented Mar 4, 2015

I thought this could be due to 356854d ( #985 ), but that was merged into dotnet/roslyn late yesterday night and your issue was filed before that. So something else seems to have caused this. I am unable to repro this failure locally either. Does this repro consistently on your machine? If so, could you collect a dump and share it?

@AdamSpeight2008
Copy link
Contributor Author

My repo master has first initiated at the at 97b84b5
and no build or test issue occurred For r#1001 to sync I had to Pull and the from on the test has had the one failure since. Hence to reference to the two pull request as I know that somewhere between them it was introduced. I'm not saying it was you, it could easily be something to do with my repo / setup.

My machine is in the Locale (UTC) Dublin, Edinburgh, Lisbon, London but the VS2015ctp6 is English (USA)
I'll clear out the bin folder and rebuild and test.

@mavasani
Copy link
Contributor

mavasani commented Mar 4, 2015

Thanks, that information helps, let me try to setup a machine with your environment and try to get a repro.

@srivatsn srivatsn added this to the 1.0 (stable) milestone Mar 4, 2015
@AdamSpeight2008
Copy link
Contributor Author

I'm just doing the clean build and test which usually takes about 30mins. I'll add and update once it's complete.
Build: OK
Test: Bad (That 1 failure again)

@gafter gafter added the Tenet-Localization Some piece of UI isn’t localized, often due to hard-coding of strings or other visible elements. label Mar 6, 2015
mavasani added a commit that referenced this issue Apr 3, 2015
Associate test TestDiagnosticLocalization with open issue #1006.
mavasani added a commit to mavasani/roslyn that referenced this issue Apr 9, 2015
…zation: Use the CultureUICulture as the default culture, not "en-US" culture.

Fixes dotnet#1006
mavasani added a commit that referenced this issue Apr 10, 2015
Localization fix for DiagnosticLocalizationTests.TestDiagnosticLocalization: Use the CurrentUICulture as the default culture, not "en-US" culture.

Fixes #1006
@mavasani mavasani removed their assignment Apr 10, 2015
@brettfo
Copy link
Member

brettfo commented May 13, 2015

Haven't seen this repro so I'm marking it as verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Analyzers Bug Tenet-Localization Some piece of UI isn’t localized, often due to hard-coding of strings or other visible elements. Test Test failures in roslyn-CI Verified
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants