Skip to content

Commit 7df4918

Browse files
committed
Merge branch '2.3.x'
Closes gh-22738
2 parents b476bf8 + 94644f3 commit 7df4918

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FileSystemWatcherTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,13 @@ void waitsForPollingInterval() throws Exception {
166166
void waitsForQuietPeriod() throws Exception {
167167
setupWatcher(300, 200);
168168
File directory = startWithNewDirectory();
169-
for (int i = 0; i < 10; i++) {
169+
for (int i = 0; i < 100; i++) {
170170
touch(new File(directory, i + "test.txt"));
171-
Thread.sleep(100);
171+
Thread.sleep(10);
172172
}
173173
this.watcher.stopAfter(1);
174174
ChangedFiles changedFiles = getSingleChangedFiles();
175-
assertThat(changedFiles.getFiles().size()).isEqualTo(10);
175+
assertThat(changedFiles.getFiles()).hasSize(100);
176176
}
177177

178178
@Test
@@ -288,12 +288,12 @@ private File startWithNewDirectory() throws IOException {
288288

289289
private ChangedFiles getSingleChangedFiles() {
290290
Set<ChangedFiles> singleChange = getSingleOnChange();
291-
assertThat(singleChange.size()).isEqualTo(1);
291+
assertThat(singleChange).hasSize(1);
292292
return singleChange.iterator().next();
293293
}
294294

295295
private Set<ChangedFiles> getSingleOnChange() {
296-
assertThat(this.changes.size()).isEqualTo(1);
296+
assertThat(this.changes).hasSize(1);
297297
return this.changes.get(0);
298298
}
299299

0 commit comments

Comments
 (0)