mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +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 {
|
||||
setupWatcher(300, 200);
|
||||
File directory = startWithNewDirectory();
|
||||
for (int i = 0; i < 10; i++) {
|
||||
for (int i = 0; i < 100; i++) {
|
||||
touch(new File(directory, i + "test.txt"));
|
||||
Thread.sleep(100);
|
||||
Thread.sleep(10);
|
||||
}
|
||||
this.watcher.stopAfter(1);
|
||||
ChangedFiles changedFiles = getSingleChangedFiles();
|
||||
assertThat(changedFiles.getFiles().size()).isEqualTo(10);
|
||||
assertThat(changedFiles.getFiles()).hasSize(100);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -288,12 +288,12 @@ class FileSystemWatcherTests {
|
||||
|
||||
private ChangedFiles getSingleChangedFiles() {
|
||||
Set<ChangedFiles> singleChange = getSingleOnChange();
|
||||
assertThat(singleChange.size()).isEqualTo(1);
|
||||
assertThat(singleChange).hasSize(1);
|
||||
return singleChange.iterator().next();
|
||||
}
|
||||
|
||||
private Set<ChangedFiles> getSingleOnChange() {
|
||||
assertThat(this.changes.size()).isEqualTo(1);
|
||||
assertThat(this.changes).hasSize(1);
|
||||
return this.changes.get(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user