mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Merge branch '2.2.x' into 2.3.x
Closes gh-22737
This commit is contained in:
commit
94644f3814
@ -166,13 +166,13 @@ class FileSystemWatcherTests {
|
|||||||
void waitsForQuietPeriod() throws Exception {
|
void waitsForQuietPeriod() throws Exception {
|
||||||
setupWatcher(300, 200);
|
setupWatcher(300, 200);
|
||||||
File directory = startWithNewDirectory();
|
File directory = startWithNewDirectory();
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 100; i++) {
|
||||||
touch(new File(directory, i + "test.txt"));
|
touch(new File(directory, i + "test.txt"));
|
||||||
Thread.sleep(100);
|
Thread.sleep(10);
|
||||||
}
|
}
|
||||||
this.watcher.stopAfter(1);
|
this.watcher.stopAfter(1);
|
||||||
ChangedFiles changedFiles = getSingleChangedFiles();
|
ChangedFiles changedFiles = getSingleChangedFiles();
|
||||||
assertThat(changedFiles.getFiles().size()).isEqualTo(10);
|
assertThat(changedFiles.getFiles()).hasSize(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -288,12 +288,12 @@ class FileSystemWatcherTests {
|
|||||||
|
|
||||||
private ChangedFiles getSingleChangedFiles() {
|
private ChangedFiles getSingleChangedFiles() {
|
||||||
Set<ChangedFiles> singleChange = getSingleOnChange();
|
Set<ChangedFiles> singleChange = getSingleOnChange();
|
||||||
assertThat(singleChange.size()).isEqualTo(1);
|
assertThat(singleChange).hasSize(1);
|
||||||
return singleChange.iterator().next();
|
return singleChange.iterator().next();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Set<ChangedFiles> getSingleOnChange() {
|
private Set<ChangedFiles> getSingleOnChange() {
|
||||||
assertThat(this.changes.size()).isEqualTo(1);
|
assertThat(this.changes).hasSize(1);
|
||||||
return this.changes.get(0);
|
return this.changes.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user