4040import java .util .Map ;
4141import java .util .concurrent .TimeUnit ;
4242import java .util .logging .Logger ;
43+ import org .apache .commons .lang3 .SystemUtils ;
4344import org .awaitility .Awaitility ;
4445import org .geotools .util .logging .Logging ;
4546import org .geowebcache .config .DefaultGridsets ;
6162import org .geowebcache .storage .TileObject ;
6263import org .geowebcache .storage .TileRange ;
6364import org .junit .After ;
65+ import org .junit .Assume ;
6466import org .junit .Before ;
6567import org .junit .Ignore ;
6668import org .junit .Test ;
@@ -88,6 +90,7 @@ public abstract class AbstractS3BlobStoreIntegrationTest {
8890
8991 @ Before
9092 public void before () throws Exception {
93+ Assume .assumeFalse ("Test skipped on Windows" , SystemUtils .IS_OS_WINDOWS );
9194 Awaitility .setDefaultPollInterval (10 , TimeUnit .MILLISECONDS );
9295 Awaitility .setDefaultPollDelay (Duration .ZERO );
9396 Awaitility .setDefaultTimeout (Duration .ofSeconds (30L ));
@@ -347,7 +350,7 @@ public void testTruncateShortCutsIfNoTilesInGridsetPrefix() throws StorageExcept
347350 /** Seed levels 0 to 2, truncate levels 0 and 1, check level 2 didn't get deleted */
348351 @ Test
349352 public void testTruncateRespectsLevels () throws StorageException , MimeException {
350-
353+ Assume . assumeFalse ( "Test skipped on Windows" , SystemUtils . IS_OS_WINDOWS );
351354 final int zoomStart = 0 ;
352355 final int zoomStop = 2 ;
353356
@@ -360,7 +363,7 @@ public void testTruncateRespectsLevels() throws StorageException, MimeException
360363
361364 seed (zoomStart , zoomStop , gridset .getName (), DEFAULT_FORMAT , null );
362365
363- BlobStoreListener listener = mock ( BlobStoreListener . class );
366+ FakeListener listener = new FakeListener ( );
364367 blobStore .addListener (listener );
365368
366369 MimeType mimeType = MimeType .createFromExtension (DEFAULT_FORMAT );
@@ -375,9 +378,10 @@ public void testTruncateRespectsLevels() throws StorageException, MimeException
375378 assertTrue (blobStore .delete (tileRange ));
376379
377380 int expectedCount = 5 ; // 1 for level 0, 4 for level 1, as per seed()
378- Awaitility .await ().untilAsserted (() -> verify (listener , times (expectedCount ))
379- .tileDeleted (
380- anyString (), anyString (), anyString (), isNull (), anyLong (), anyLong (), anyInt (), anyLong ()));
381+ Awaitility .await ().untilAsserted (() -> {
382+ assertEquals (expectedCount , listener .tileDeleted );
383+ assertEquals (expectedCount , listener .total ());
384+ });
381385 }
382386
383387 @ Test
0 commit comments