From 0b9ac1724ba1fd18461f81a20e25905b01c534e7 Mon Sep 17 00:00:00 2001 From: kwilk Date: Thu, 26 May 2011 16:58:30 -0700 Subject: bug: Fix to RelationCacheTest failure --- .../framework/skynet/core/relation/RelationCacheTest.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'plugins/org.eclipse.osee.framework.skynet.core.test') diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/RelationCacheTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/RelationCacheTest.java index 6205cc0660f..2ce27e97578 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/RelationCacheTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/RelationCacheTest.java @@ -129,14 +129,24 @@ public class RelationCacheTest { Assert.assertEquals(0, relCache.getAll(artfact2).size()); } + /** + *

+ * When RelationCache.cache() is changed to throw an exception for a duplicate relation,
+ * then this test should fail and severeLoggingMonitor should not be paused. + *

+ * + * @throws Exception + */ @Test - public void testCanAddCacheSameRelTwice() { + public void testCanAddCacheSameRelTwice() throws Exception { RelationCache relCache = new RelationCache(); RelationLink link1 = sourceLinksRelType1.iterator().next(); + severeLoggingMonitor.pause(); relCache.cache(artfact1, link1); relCache.cache(artfact1, link1); + severeLoggingMonitor.resume(); Assert.assertEquals(2, relCache.getAll(artfact1).size()); } -- cgit v1.2.3