Skip to content

Adding sleep in scripted test to make sure timestamp bumps#2565

Merged
eed3si9n merged 1 commit intosbt:0.13from
eed3si9n:wip/error-in-invalidated
Apr 19, 2016
Merged

Adding sleep in scripted test to make sure timestamp bumps#2565
eed3si9n merged 1 commit intosbt:0.13from
eed3si9n:wip/error-in-invalidated

Conversation

@eed3si9n
Copy link
Member

Fixes #2546. Ref #958/#965

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 for changes/A2.scala.

Perhaps the machines are getting fast enough that we are doing three compilations within 1s?

/review @gkossakowski, @Duhemm

Fixes sbt#2546. Ref sbt#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`.
@smarter
Copy link
Contributor

smarter commented Apr 18, 2016

In #2523 I've been seeing flaky failures in the new test types-in-used-names-b, I wonder if that's the same issue. If so, it sure sounds like we need a better solution than randomly adding sleeps until the tests pass.

@eed3si9n
Copy link
Member Author

eed3si9n commented Apr 18, 2016

Assuming that the underlying issue is the change detection via last modified date, two alternatives I can think of are:

  1. checking hash of files to look for changes. (what's the overhead on calculating 1000s of hashes)
  2. Java 7 file watching

@eed3si9n eed3si9n added this to the 0.13.12 milestone Apr 18, 2016
@eed3si9n
Copy link
Member Author

I wonder if we can treat timestamp == timestamp case to be invalidated. This might also require another $ sleep 1000 for the reserve reason. For example, to test incremental compiler not doing additional compilation, we'd need to wait 1s.

@eed3si9n eed3si9n merged commit 6b16ade into sbt:0.13 Apr 19, 2016
@gkossakowski
Copy link
Contributor

I have never seen this problem on my Mac. Is time resolution on Travis filesystem lower?

@gkossakowski
Copy link
Contributor

@smarter, did you encounter the problem you describe on your local machine?

@smarter
Copy link
Contributor

smarter commented Apr 20, 2016

I didn't manage to get types-in-used-names-b to fail locally, but it still fails occasionally on travis with sleep 1000 so that's not it.

dwijnand pushed a commit to dwijnand/sbt that referenced this pull request Jan 3, 2017
Fixes sbt#2546. Ref sbt#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`.

Forward-port of sbt#2565
dwijnand pushed a commit to dwijnand/sbt that referenced this pull request Jan 5, 2017
Fixes sbt#2546. Ref sbt#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`.

Forward-port of sbt#2565
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants