|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2019 the original author or authors. |
| 2 | + * Copyright 2012-2020 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -165,13 +165,13 @@ void waitsForPollingInterval() throws Exception {
|
165 | 165 | void waitsForQuietPeriod() throws Exception {
|
166 | 166 | setupWatcher(300, 200);
|
167 | 167 | File folder = startWithNewFolder();
|
168 |
| - for (int i = 0; i < 10; i++) { |
| 168 | + for (int i = 0; i < 100; i++) { |
169 | 169 | touch(new File(folder, i + "test.txt"));
|
170 |
| - Thread.sleep(100); |
| 170 | + Thread.sleep(10); |
171 | 171 | }
|
172 | 172 | this.watcher.stopAfter(1);
|
173 | 173 | ChangedFiles changedFiles = getSingleChangedFiles();
|
174 |
| - assertThat(changedFiles.getFiles().size()).isEqualTo(10); |
| 174 | + assertThat(changedFiles.getFiles()).hasSize(100); |
175 | 175 | }
|
176 | 176 |
|
177 | 177 | @Test
|
@@ -287,12 +287,12 @@ private File startWithNewFolder() throws IOException {
|
287 | 287 |
|
288 | 288 | private ChangedFiles getSingleChangedFiles() {
|
289 | 289 | Set<ChangedFiles> singleChange = getSingleOnChange();
|
290 |
| - assertThat(singleChange.size()).isEqualTo(1); |
| 290 | + assertThat(singleChange).hasSize(1); |
291 | 291 | return singleChange.iterator().next();
|
292 | 292 | }
|
293 | 293 |
|
294 | 294 | private Set<ChangedFiles> getSingleOnChange() {
|
295 |
| - assertThat(this.changes.size()).isEqualTo(1); |
| 295 | + assertThat(this.changes).hasSize(1); |
296 | 296 | return this.changes.get(0);
|
297 | 297 | }
|
298 | 298 |
|
|
0 commit comments