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`.
This commit is contained in:
Eugene Yokota 2016-04-18 12:15:54 -04:00
parent c35cb7f54e
commit 6b16ade94b
2 changed files with 9 additions and 1 deletions

View File

@ -1 +1,5 @@
incOptions := sbt.inc.IncOptions.Default
lazy val root = (project in file(".")).
settings(
incOptions := sbt.inc.IncOptions.Default,
scalaVersion := "2.11.7"
)

View File

@ -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