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

iOS: Updating matrix file fails with java.lang.NumberFormatException: For input string: "167,793" #466

Closed
gtroshin opened this issue Jan 18, 2019 · 5 comments
Labels

Comments

@gtroshin
Copy link

gtroshin commented Jan 18, 2019

java -jar ./flank.jar -v
v4.2-SNAPSHOT
a7d6d719225208f5d4c0cac72ab23ea8a31ea3f1

There is an exception happens in the end of FetchArtifacts when it starts updating matrix file. So it does not go further and does not upload smartFlank .xml file.

FetchArtifacts
  .......................................................
  Updating matrix file

Exception in thread "main" picocli.CommandLine$ExecutionException: Error while running command (ftl.cli.firebase.test.ios.IosRunCommand@2dbc408c): java.lang.NumberFormatException: For input string: "167,793"
	at picocli.CommandLine.execute(CommandLine.java:1168)
	at picocli.CommandLine.access$800(CommandLine.java:141)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:1367)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:1335)
	at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1243)
	at picocli.CommandLine.parseWithHandlers(CommandLine.java:1526)
	at picocli.CommandLine.run(CommandLine.java:1974)
	at picocli.CommandLine.run(CommandLine.java:1920)
	at ftl.Main$Companion.main(Main.kt:48)
	at ftl.Main.main(Main.kt)
Caused by: java.lang.NumberFormatException: For input string: "167,793"
	at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
	at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.base/java.lang.Double.parseDouble(Double.java:543)
	at ftl.reports.xml.model.JUnitTestSuite.mergeDouble(JUnitTestSuite.kt:54)
	at ftl.reports.xml.model.JUnitTestSuite.merge(JUnitTestSuite.kt:65)
	at ftl.reports.xml.model.JUnitTestResult.merge(JUnitTestResult.kt:40)
	at ftl.reports.util.ReportManager.processXml(ReportManager.kt:62)
	at ftl.reports.util.ReportManager.parseTestSuite(ReportManager.kt:71)
	at ftl.reports.util.ReportManager.generate(ReportManager.kt:79)
	at ftl.run.TestRunner.newRun(TestRunner.kt:356)
	at ftl.run.TestRunner$newRun$1.invokeSuspend(TestRunner.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)
	at kotlinx.coroutines.ResumeModeKt.resumeUninterceptedMode(ResumeMode.kt:45)
	at kotlinx.coroutines.internal.ScopeCoroutine.onCompletionInternal$kotlinx_coroutines_core(Scopes.kt:28)
	at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:305)
	at kotlinx.coroutines.JobSupport.tryFinalizeFinishingState(JobSupport.kt:230)
	at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:799)
	at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:742)
	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:117)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:45)
	at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.kt:116)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:76)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:53)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:35)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at ftl.cli.firebase.test.ios.IosRunCommand.run(IosRunCommand.kt:31)
	at picocli.CommandLine.execute(CommandLine.java:1160)
	... 9 more
@gtroshin gtroshin changed the title Updating matrix file fails with java.lang.NumberFormatException: For input string: "167,793" iOS: Updating matrix file fails with java.lang.NumberFormatException: For input string: "167,793" Jan 18, 2019
@gtroshin
Copy link
Author

Actually it is reproducible with flank refresh.

 java -jar ./flank.jar refresh
Loading run 2019-01-18_10:26:07.646949_CKvz
RefreshMatrices

PollMatrices

FetchArtifacts

And then the same exception.

@gtroshin
Copy link
Author

gtroshin commented Jan 18, 2019

Btw there is no place in results folder, including 167,793

image

@gtroshin
Copy link
Author

gtroshin commented Jan 18, 2019

I removed all shard_* folders and only kept rest of generated stuff, then re-run java -jar ./flank.jar refresh. It worked, but JUnitReport.xml file is empty.

UPD: I still investigating this issue. It is unclear why it is happening. It is pass when I exclude some test cases from run. I will post an update when have details.

@bootstraponline
Copy link
Contributor

oh, that's a bug! Thank you for reporting.

I think Flank has an assumption about value ranges that ended up not being true which caused the crash. Updating the parsing code should resolve the problem. I'll take a look when I have some time.

@bootstraponline
Copy link
Contributor

This bug is fixed on master. The snapshot will automatically be published in a few minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants