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

Created on 18 Jan 2019  路  5Comments  路  Source: Flank/flank

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
Bug

All 5 comments

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.

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

image

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.

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bootstraponline picture bootstraponline  路  6Comments

jrodbx picture jrodbx  路  4Comments

Sloox picture Sloox  路  3Comments

bootstraponline picture bootstraponline  路  4Comments

jakob-grabner picture jakob-grabner  路  7Comments