Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci_test_vector_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
jobs:
testJava:
strategy:
fail-fast: false
matrix:
library: [TestVectors]
java-version: [8, 11, 17, 19]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ public void testSingleVersion() throws InterruptedException {
0,
store.getVersionFromMaterialDescription(eMat2.getMaterialDescription())
);
// Let the TTL be exceeded
Thread.sleep(500);
// Let the TTL be exceeded; sleep must be > TTL (500ms) to reliably
// land in the grace period and trigger a cache refresh.
Thread.sleep(700);
final EncryptionMaterials eMat3 = prov.getEncryptionMaterials(ctx);
assertEquals(2, methodCalls.size());
assertEquals(1, (int) methodCalls.getOrDefault("query", 0)); // To find current version
Expand Down Expand Up @@ -356,8 +357,9 @@ public void testTwoVersions() throws InterruptedException {
"Expected no calls but was " + methodCalls.toString(),
methodCalls.isEmpty()
);
// Let the TTL be exceeded
Thread.sleep(500);
// Let the TTL be exceeded; sleep must be > TTL (500ms) to reliably
// land in the grace period and trigger a cache refresh.
Thread.sleep(700);
final EncryptionMaterials eMat3 = prov.getEncryptionMaterials(ctx);

assertEquals(1, (int) methodCalls.getOrDefault("query", 0)); // To find current version
Expand Down Expand Up @@ -512,8 +514,9 @@ public void testSingleVersionTwoMaterials() throws InterruptedException {
store.getVersionFromMaterialDescription(eMat2_2.getMaterialDescription())
);

// Let the TTL be exceeded
Thread.sleep(500);
// Let the TTL be exceeded; sleep must be > TTL (500ms) to reliably
// land in the grace period and trigger a cache refresh.
Thread.sleep(700);
final EncryptionMaterials eMat3_1 = prov.getEncryptionMaterials(ctx1);
assertEquals(2, methodCalls.size());
assertEquals(1, (int) methodCalls.get("query")); // To find current version
Expand Down
Loading