GEODE-296: change test to handle EntryDestroyedException
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/97c53517 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/97c53517 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/97c53517 Branch: refs/heads/feature/GEODE-77 Commit: 97c53517e11e23936d488e2cca25f733a33f898e Parents: 6b1c780 Author: Darrel Schneider <[email protected]> Authored: Tue Nov 3 14:53:07 2015 -0800 Committer: Darrel Schneider <[email protected]> Committed: Tue Nov 3 14:53:07 2015 -0800 ---------------------------------------------------------------------- .../tier/sockets/HAInterestPart2DUnitTest.java | 24 ++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/97c53517/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart2DUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart2DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart2DUnitTest.java index b861786..eaa1ca1 100755 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart2DUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestPart2DUnitTest.java @@ -272,12 +272,28 @@ public class HAInterestPart2DUnitTest extends HAInterestBaseTest { public boolean done() { Region.Entry e1 = r1.getEntry(k1); Region.Entry e2 = r1.getEntry(k2); - if (e1 == null || !server_k1_updated.equals(e1.getValue())) { - excuse = "k1=" + (e1 == null ? "null" : e1.getValue()); + Object v1 = null; + if (e1 != null) { + try { + v1 = e1.getValue(); + } catch (EntryDestroyedException ignore) { + // handled to fix GEODE-296 + } + } + if (e1 == null || !server_k1_updated.equals(v1)) { + excuse = "v1=" + v1; return false; } - if (e2 == null || !server_k2.equals(e2.getValue())) { - excuse = "k2=" + (e2 == null ? "null" : e2.getValue()); + Object v2 = null; + if (e2 != null) { + try { + v2 = e2.getValue(); + } catch (EntryDestroyedException ignore) { + // handled to fix GEODE-296 + } + } + if (e2 == null || !server_k2.equals(v2)) { + excuse = "v2=" + v2; return false; } return true;
