diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/AsyncAPI.java | 7 | ||||
-rw-r--r-- | tests/Makefile | 9 | ||||
-rw-r--r-- | tests/SendNow.java | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/AsyncAPI.java b/tests/AsyncAPI.java index e174929..1f07565 100644 --- a/tests/AsyncAPI.java +++ b/tests/AsyncAPI.java @@ -43,8 +43,7 @@ class AsyncAPI { public AsyncAPI(int nb,String domain,int d, boolean v,boolean async) throws IvyException { verbose=v; nbpacket=nb; - name = "MSreceive"; - bus = new Ivy(name,null, null); + bus = new Ivy(RECEIVENAME,null, null); wait = d; delay=new DelayAnswer(); if (async) re = bus.bindAsyncMsg(TOSUBSCRIBE,delay,BindType.ASYNC); @@ -59,7 +58,7 @@ class AsyncAPI { static Object truc = new Object(); - int count=0,total=0; + volatile int count=0,total=0; int status = 0; synchronized void huh(IvyClient ic, String[] args) { @@ -95,7 +94,7 @@ class AsyncAPI { Thread.sleep(wait); System.out.println("RECEIVE Finished Sleeping"); } catch (InterruptedException ie) { - ie.printStackTrace(); + System.out.println("RECEIVE Sleeping interrupted, not a problem"); } } } diff --git a/tests/Makefile b/tests/Makefile index b313a50..d7dd85b 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -26,13 +26,14 @@ all: $(JAVAC) -d classes $(JAVACOPTS) $(CLASSPATH) $(SRC) @echo "all modules built. run make run" -run: sendnow sendnowself nl api filter unitaires probe stop request test1 async test2 +run: sendnowself nl api filter unitaires probe stop request test1 test2 async +fail: sendnow request: @echo "*****************************" @echo "TEST REQUEST" @echo "*****************************" - $(JAVA) $(DEBUG) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) Request $(DOMAIN) + $(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) Request $(DOMAIN) @echo "*****************************" @echo "TEST REQUEST successful" @echo "*****************************" @@ -42,7 +43,7 @@ sendnowself: @echo "*****************************" @echo "TEST SENDNOW SELF" @echo "*****************************" - $(JAVA) $(DEBUG) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) SendNowSelf $(DOMAIN) + $(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) SendNowSelf $(DOMAIN) @echo "*****************************" @echo "TEST SENDNOW SELF successful" @echo "*****************************" @@ -52,7 +53,7 @@ sendnow: @echo "*****************************" @echo "TEST SENDNOW" @echo "*****************************" - $(JAVA) $(DEBUG) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) SendNow $(DOMAIN) + $(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) SendNow $(DOMAIN) @echo "*****************************" @echo "TEST SENDNOW successful" @echo "*****************************" diff --git a/tests/SendNow.java b/tests/SendNow.java index 093ee19..739bc41 100644 --- a/tests/SendNow.java +++ b/tests/SendNow.java @@ -49,7 +49,7 @@ public class SendNow { // else is joining the bus // we could add something at the JVM level, but it's no use for inter // process anyway. 200ms before close + lock is long enough - System.out.println("race condition: the Receiver has not received our message, quitting anyway"); + System.out.println("the Receiver has not received our message, quitting anyway"); System.exit(-1); } } catch (IvyException ie) { |