Fix test by catching expected exception
authorCherian Mathew <c.mathew@bgbm.org>
Thu, 29 Oct 2015 16:46:45 +0000 (17:46 +0100)
committerCherian Mathew <c.mathew@bgbm.org>
Thu, 29 Oct 2015 16:46:45 +0000 (17:46 +0100)
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ProgressMonitorServiceTest.java

index b4d2c3344691d8907fc41f0b30286a1f0fc22526..15d110e38e7dd858217d74e8527c3d00328930d9 100644 (file)
@@ -86,12 +86,17 @@ public class ProgressMonitorServiceTest extends RemotingSessionAwareTest {
         expectedMonitor.setResult(ise);
         expectedMonitor.setIsFailed(true);
         expectedMonitor.done();
         expectedMonitor.setResult(ise);
         expectedMonitor.setIsFailed(true);
         expectedMonitor.done();
-        CdmStore.getProgressMonitorClientManager().pollMonitor("Testing Progress Monitor",
-                uuid,
-                pollInterval,
-                new MockPostMoniteredOperationEnabled(expectedMonitor, uuid),
-                (IFeedbackGenerator)null,
-                new NullProgressMonitor());
+        try {
+            CdmStore.getProgressMonitorClientManager().pollMonitor("Testing Progress Monitor",
+                    uuid,
+                    pollInterval,
+                    new MockPostMoniteredOperationEnabled(expectedMonitor, uuid),
+                    (IFeedbackGenerator)null,
+                    new NullProgressMonitor());
+            Assert.fail("Exception due to inconsistent number of feedback generators not thrown");
+        } catch(IllegalStateException e) {
+
+        }
     }
 
     @Test
     }
 
     @Test