added test case to TestSignal.java 43/59143/6
authorSandeep J <sandeejh@in.ibm.com>
Mon, 6 Aug 2018 10:22:34 +0000 (15:52 +0530)
committerTakamune Cho <tc012c@att.com>
Wed, 8 Aug 2018 13:21:20 +0000 (13:21 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: Ief0a74d2132295258c1a198309e310c235cad923
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-common/src/test/java/org/onap/appc/concurrent/TestSignal.java

index a5cd553..4b5eadd 100644 (file)
@@ -144,4 +144,12 @@ public class TestSignal {
         String receivedSignal= mySignal.waitForAny(SIGNAL_READY);
         assertEquals("READY", receivedSignal);
     }
+    
+    @Test(expected=TimeoutException.class)
+    public void testWaitForAnyForEmptySignal() throws TimeoutException
+    {
+        Signal mySignal = new Signal(Thread.currentThread());
+        mySignal.setTimeout(50L);
+        mySignal.waitForAny();
+    }
 }