Skip to content

Commit

Permalink
Bug 35575377 - Build: intermittent failure in ViewDistProcessorTests.…
Browse files Browse the repository at this point in the history
…updateAfterExpiry() (merge 14.1.1.2206 -> ce/22.06 @ 111370)

[git-p4: depot-paths = "//dev/coherence-ce/release/coherence-ce-v22.06/": change = 111585]
  • Loading branch information
chpatel3 committed Sep 25, 2024
1 parent 8650037 commit 8a3f7e3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion prj/coherence-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
<maven.bundle.plugin.version>5.1.1</maven.bundle.plugin.version>
<maven.compiler.plugin.version>3.12.1</maven.compiler.plugin.version>
<maven.dependency.plugin.version>3.3.0</maven.dependency.plugin.version>
<maven.dependency-check.plugin.version>10.0.0</maven.dependency-check.plugin.version>
<maven.dependency-check.plugin.version>10.0.2</maven.dependency-check.plugin.version>
<maven.deploy.plugin.version>2.8.2</maven.deploy.plugin.version>
<maven.directory.plugin.version>0.1</maven.directory.plugin.version>
<maven.docker.plugin.version>0.15.7</maven.docker.plugin.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2023, Oracle and/or its affiliates.
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -117,10 +117,14 @@ public void expiry()
{
NamedCache cache = getNamedCache();
cache.clear();
Eventually.assertDeferred(cache::size, is(0));
Eventually.assertDeferred("The cache should be empty. Cache contents: " + cache.entrySet(), cache::isEmpty, is(true));

cache.put("key", "value");
Eventually.assertDeferred(cache::size, is(1));

InvocableMap.EntryProcessor processor =
new ExpiryProcessor(ExpiryProcessor.Mode.UPDATE_NONE, 1L);
new ExpiryProcessor(ExpiryProcessor.Mode.UPDATE_NONE, 100L);
cache.invoke("key", processor);

Eventually.assertDeferred(cache::isEmpty, is(true));
Expand All @@ -139,11 +143,14 @@ public void updateBeforeExpiry()
{
NamedCache cache = getNamedCache();
cache.clear();
Eventually.assertDeferred(cache::isEmpty, is(true));
Eventually.assertDeferred("The cache should be empty. Cache contents: " + cache.entrySet(), cache::isEmpty, is(true));
Eventually.assertDeferred(cache::size, is(0));

cache.put("key", "value");
Eventually.assertDeferred(cache::size, is(1));

InvocableMap.EntryProcessor processor =
new ExpiryProcessor(ExpiryProcessor.Mode.UPDATE_BEFORE_BIN, 1L);
new ExpiryProcessor(ExpiryProcessor.Mode.UPDATE_BEFORE_BIN, 100L);
cache.invoke("key", processor);

Eventually.assertDeferred(cache::isEmpty, is(true));
Expand All @@ -164,11 +171,14 @@ public void updateAfterExpiry()
{
NamedCache cache = getNamedCache();
cache.clear();
Eventually.assertDeferred(cache::isEmpty, is(true));
Eventually.assertDeferred("The cache should be empty. Cache contents: " + cache.entrySet(), cache::isEmpty, is(true));
Eventually.assertDeferred(cache::size, is(0));

cache.put("key", "value");
Eventually.assertDeferred(cache::size, is(1));

InvocableMap.EntryProcessor processor =
new ExpiryProcessor(ExpiryProcessor.Mode.UPDATE_AFTER_BIN, 1L);
new ExpiryProcessor(ExpiryProcessor.Mode.UPDATE_AFTER_BIN, 100L);
cache.invoke("key", processor);

Eventually.assertDeferred(cache::isEmpty, is(true));
Expand Down

0 comments on commit 8a3f7e3

Please sign in to comment.