From 6b16ade94b6c354e8a776f1434dbfe76d131dbee Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 18 Apr 2016 12:15:54 -0400 Subject: [PATCH] Adding sleep in scripted test to make sure timestamp bumps Fixes #2546. Ref #958 scripted compiler-project/error-in-invalidated has been failing frequently on Travis CI. It seems like incremental compiler is not catching the change in source occasionally for `changes/A2.scala`. --- .../compiler-project/error-in-invalidated/build.sbt | 6 +++++- sbt/src/sbt-test/compiler-project/error-in-invalidated/test | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sbt/src/sbt-test/compiler-project/error-in-invalidated/build.sbt b/sbt/src/sbt-test/compiler-project/error-in-invalidated/build.sbt index f06e1de7d..8a40ded0c 100644 --- a/sbt/src/sbt-test/compiler-project/error-in-invalidated/build.sbt +++ b/sbt/src/sbt-test/compiler-project/error-in-invalidated/build.sbt @@ -1 +1,5 @@ -incOptions := sbt.inc.IncOptions.Default +lazy val root = (project in file(".")). + settings( + incOptions := sbt.inc.IncOptions.Default, + scalaVersion := "2.11.7" + ) diff --git a/sbt/src/sbt-test/compiler-project/error-in-invalidated/test b/sbt/src/sbt-test/compiler-project/error-in-invalidated/test index 5f4cf63f8..9f4537091 100644 --- a/sbt/src/sbt-test/compiler-project/error-in-invalidated/test +++ b/sbt/src/sbt-test/compiler-project/error-in-invalidated/test @@ -1,9 +1,13 @@ > compile + # comment out `initialized` method in A $ copy-file changes/A1.scala src/main/scala/A.scala +$ sleep 1000 # compilation of A.scala succeeds but B.scala gets invalidated (properly) and B.scala fails to compile -> compile + # we change A.scala to its original shape so compilation should succeed again $ copy-file changes/A2.scala src/main/scala/A.scala +$ sleep 1000 # this fails at the moment due to use of stale class file for A, see #958 for details > compile