@@ -2658,11 +2658,12 @@ public void testKekCacheInvalidateOnDeleteEntry() throws Exception {
26582658 long uncachedTime = System .currentTimeMillis () - start ;
26592659 assertNotNull (key2Again );
26602660
2661- /* Verify it was slower */
2661+ /* Verify it was slower. Use 2x threshold since timing can vary
2662+ * significantly on CI systems with fast storage. */
26622663 assertTrue ("Cache should have been cleared, but timing suggests " +
26632664 "it wasn't (cached: " + cachedTime + "ms, uncached: " +
26642665 uncachedTime + "ms)" ,
2665- uncachedTime > cachedTime * 5 );
2666+ uncachedTime > cachedTime * 2 );
26662667
26672668 } finally {
26682669 if (origEnabled != null ) {
@@ -2715,11 +2716,12 @@ public void testKekCacheInvalidateOnSetKeyEntryOverwrite()
27152716 long uncachedTime = System .currentTimeMillis () - start ;
27162717 assertNotNull (key2Again );
27172718
2718- /* Verify it was slower */
2719+ /* Verify it was slower. Use 2x threshold since timing can vary
2720+ * significantly on CI systems with fast storage. */
27192721 assertTrue ("Cache should have been cleared, but timing suggests " +
27202722 "it wasn't (cached: " + cachedTime + "ms, uncached: " +
27212723 uncachedTime + "ms)" ,
2722- uncachedTime > cachedTime * 5 );
2724+ uncachedTime > cachedTime * 2 );
27232725
27242726 } finally {
27252727 if (origEnabled != null ) {
0 commit comments