-
Notifications
You must be signed in to change notification settings - Fork 175
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
Wrong Logging usage of unexpected test case in initial test run leads to stryker crash #2929
Comments
Thanks for reporting. I am working on a fix. |
As mentioned in the ticket, I am actually working on a fix myself but I am including other, similar logging calls. Not necessarily as severe but nevertheless not quite right. |
Ok |
Envoyé de mon iPhoneLe 2 mai 2024 à 18:06, Dirk-Peters-BF ***@***.***> a écrit :
As mentioned in the ticket, I am actually working on a fix myself but I am including other, similar logging calls. Not necessarily as severe but nevertheless not quite right.
My Problem for the described problem is to reproduce outside of the original sources.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were assigned.Message ID: ***@***.***>
|
- fix combination of string interpolation with parameters in logging call in Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs - harmonize logging calls: * remove string interpolation * use parameter name instead of index * use constant log messages
- fix combination of string interpolation with parameters in logging call in Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs - harmonize logging calls: * remove string interpolation * use parameter name instead of index * use constant log messages
The opened pull request contains the fix + some logging call harmonizing |
- fix combination of string interpolation with parameters in logging call in Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs - harmonize logging calls: * remove string interpolation * use parameter name instead of index * use constant log messages
…2931) - fix combination of string interpolation with parameters in logging call in Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs - harmonize logging calls: * remove string interpolation * use parameter name instead of index * use constant log messages Co-authored-by: Rouke Broersma <rouke.broersma@infosupport.com>
Describe the bug
Stryker run is aborted due to crash when a specific logging call in
VsTestRunner.InitialTest
Line 60 is used, when a new unexpected test case is detected in the intial test run.Logs
System.FormatException: Input string was not in a correct format. Failure to parse near offset 132. Expected an ASCII digit.
00:02:36 at System.Text.CompositeFormat.Parse(String format)
00:02:36 at Microsoft.Extensions.Logging.LogValuesFormatter..ctor(String format)
00:02:36 at Microsoft.Extensions.Logging.FormattedLogValues.<>c.<.ctor>b__9_0(String f)
00:02:36 at Microsoft.Extensions.Logging.FormattedLogValues..ctor(String format, Object[] values)
00:02:36 at Microsoft.Extensions.Logging.LoggerExtensions.Log(ILogger logger, LogLevel logLevel, EventId eventId, Exception exception, String message, Object[] args)
00:02:36 at Microsoft.Extensions.Logging.LoggerExtensions.Log(ILogger logger, LogLevel logLevel, String message, Object[] args)
00:02:36 at Microsoft.Extensions.Logging.LoggerExtensions.LogWarning(ILogger logger, String message, Object[] args)
00:02:36 at Stryker.Core.TestRunners.VsTest.VsTestRunner.InitialTest(IProjectAndTests project) in //src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs:line 60
00:02:36 at Stryker.Core.TestRunners.VsTest.VsTestRunnerPool.<>c__DisplayClass12_0.b__0(VsTestRunner runner) in //src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs:line 62
00:02:36 at Stryker.Core.TestRunners.VsTest.VsTestRunnerPool.RunThis[T](Func
2 task) in /_/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs:line 103 00:02:36 at Stryker.Core.TestRunners.VsTest.VsTestRunnerPool.InitialTest(IProjectAndTests project) in /_/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunnerPool.cs:line 62 00:02:36 at Stryker.Core.Initialisation.InitialTestProcess.InitialTest(StrykerOptions options, IProjectAndTests project, ITestRunner testRunner) in /_/src/Stryker.Core/Stryker.Core/Initialisation/InitialTestProcess.cs:line 35 00:02:36 at Stryker.Core.Initialisation.InitialisationProcess.InitialTest(StrykerOptions options, SourceProjectInfo projectInfo, ITestRunner testRunner, Boolean throwIfFails) in /_/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs:line 128 00:02:36 at Stryker.Core.Initialisation.InitialisationProcess.GetMutationTestInputs(StrykerOptions options, IReadOnlyCollection
1 projects, ITestRunner runner) in //src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs:line 10600:02:36 at Stryker.Core.Initialisation.ProjectOrchestrator.MutateProjects(StrykerOptions options, IReporter reporters, ITestRunner runner) in //src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs:line 66
00:02:36 at Stryker.Core.StrykerRunner.RunMutationTest(IStrykerInputs inputs, ILoggerFactory loggerFactory, IProjectOrchestrator projectOrchestrator) in /_/src/Stryker.Core/Stryker.Core/StrykerRunner.cs:line 63
Expected behavior
Stryker does not crash.
Desktop (please complete the following information):
Additional context
Reason for abort is wrong usage of Microsoft Logging. String interpolation is used in conjunction with parameters.
I can provide a fix myself, just need a ticket/justification.
The text was updated successfully, but these errors were encountered: