microsoft / Recognizers-Text

Microsoft.Recognizers.Text provides recognition and resolution of numbers, units, date/time, etc. in multiple languages (ZH, EN, FR, ES, PT, DE, IT, TR, HI, NL. Partial support for JA, KO, AR, SV). Packages available at: https://www.nuget.org/profiles/Recognizers.Text, https://www.npmjs.com/~recognizers.text
MIT License
1.68k stars 430 forks source link

[DateTimeModel] Test Microsoft.Recognizers.Text.DateTime.Tests. TestDateTime_German DateTimeModel occasionally fail #3149

Closed MichaelMWW closed 1 week ago

MichaelMWW commented 3 months ago

Describe the bug Test Microsoft.Recognizers.Text.DateTime.Tests. TestDateTime_German DateTimeModel occasionally fail

To Reproduce Steps to reproduce the behavior:

  1. Open the Microsoft.Recognizers.Text.sln solution under .NET folder, build the solution.
  2. Open the Test Explorer, find the test Microsoft.Recognizers.Text.DateTime.Tests. TestDateTime_German DateTimeModel, right click it and click Run Until Failure, the issue can be repro, more details please refer below image. image

Expected behavior The test passed

Sample input/output Test failed occasionally, it is an issue not always repro.

Failed build: https://ci.appveyor.com/project/tellarin/recognizers-text/builds/50375089

Error message: Failed Microsoft.Recognizers.Text.DateTime.Tests.TestDateTime_German DateTimeModel [13 ms] Error Message: Test method Microsoft.Recognizers.Text.DateTime.Tests.TestDateTime_German.DateTimeModel threw exception: System.ApplicationException: Input: "Tag der Arbeit, ersten Weihnachtsfeiertag, zweiten Weihnachtstag" ---> System.NullReferenceException: Object reference not set to an instance of an object. Stack Trace: at Microsoft.Recognizers.Text.DataDrivenTests.TestBase.TestDateTime(TestModel testSpec) in C:\projects\recognizers-text.NET\Microsoft.Recognizers.Text.DataDrivenTests\TestBase.cs:line 87 --- End of inner exception stack trace --- at Microsoft.Recognizers.Text.DataDrivenTests.TestBase.TestDateTime(TestModel testSpec) in C:\projects\recognizers-text.NET\Microsoft.Recognizers.Text.DataDrivenTests\TestBase.cs:line 138 at Microsoft.Recognizers.Text.DateTime.Tests.TestDateTime_German.DateTimeModel(TestModel testSpec) in C:\projects\recognizers-text.NET\Microsoft.Recognizers.Text.DataDrivenTests\DateTime\TestDateTime_German.cs:line 206

Platform (please complete the following information):

Additional context Add any other context about the problem here.

MichaelMWW commented 1 week ago

This bug is fixed in PR https://github.com/microsoft/Recognizers-Text/pull/3175.