• Andy Wilkinson's avatar
    Try to make FileSystemWatcherTests.waitsForQuietPeriod() more robust · 2238b0d7
    Andy Wilkinson authored
    Previously, waitsForQuietPeriod would iterate 10 times, touching a new
    file and then sleeping for 100ms at it did so. With a quiet period of
    200ms, this was intended to result in a single change set containing
    10 files. However, the test would fail occasionally as multiple change
    sets were detected. The test is multi-threaded and is, therefore, at
    the mercy of the scheduler. If the thread that is iterating and
    touching the files takes over 200ms to be scheduled – exceeding the
    watcher's quiet period – the watcher may detect a change set while the
    changes are still being made. Eliminating this possibilty would require
    the test to participate in the watcher's synchronization, which would
    require some changes to its implementation. Instead, this commit
    aims to avoid the problem by sleeping for 1/10 of the time (10ms) and
    expecting a single change set of 100 files. The hope is that the much
    shorter sleep time will result in the file touching thread being
    scheduled well within the 200ms quiet period.
    
    Closes gh-22732
    2238b0d7
Name
Last commit
Last update
.bomr Loading commit data...
.github Loading commit data...
.mvn Loading commit data...
ci Loading commit data...
eclipse Loading commit data...
git/hooks Loading commit data...
idea Loading commit data...
spring-boot-project Loading commit data...
spring-boot-tests Loading commit data...
src/checkstyle Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
SUPPORT.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...