From 47db114a6381114cb60a56f2fd9ba86f2cd1c3a1 Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Fri, 26 Apr 2019 04:03:34 -0400 Subject: [PATCH] Fix flank cancel --- test_runner/src/main/kotlin/ftl/run/TestRunner.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test_runner/src/main/kotlin/ftl/run/TestRunner.kt b/test_runner/src/main/kotlin/ftl/run/TestRunner.kt index d6c7378cc6..69a3842bf1 100644 --- a/test_runner/src/main/kotlin/ftl/run/TestRunner.kt +++ b/test_runner/src/main/kotlin/ftl/run/TestRunner.kt @@ -143,7 +143,9 @@ object TestRunner { val resultsFile = Paths.get(args.localResultDir).toFile() if (!resultsFile.exists()) return null - val scheduledRuns = resultsFile.listFiles().filter { it.isDirectory }.sortedBy { it.lastModified() } + val scheduledRuns = resultsFile.listFiles() + .filter { it.isDirectory } + .sortedByDescending { it.lastModified() } if (scheduledRuns.isEmpty()) return null return scheduledRuns.first().name