You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@etch.apache.org by sc...@apache.org on 2009/02/26 19:14:11 UTC
svn commit: r748254 - in /incubator/etch/trunk: ./
interoptester/example/src/main/java/org/apache/etch/interoptester/example/iot/
scripts/
Author: sccomer
Date: Thu Feb 26 18:14:11 2009
New Revision: 748254
URL: http://svn.apache.org/viewvc?rev=748254&view=rev
Log:
update java interoptest example to also run during normal etch build.
Modified:
incubator/etch/trunk/.classpath
incubator/etch/trunk/interoptester/example/src/main/java/org/apache/etch/interoptester/example/iot/MainIOTClient.java
incubator/etch/trunk/interoptester/example/src/main/java/org/apache/etch/interoptester/example/iot/MainIOTListener.java
incubator/etch/trunk/scripts/compEtchFilesForJava.bat
incubator/etch/trunk/scripts/compEtchFilesForXml.bat
Modified: incubator/etch/trunk/.classpath
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/.classpath?rev=748254&r1=748253&r2=748254&view=diff
==============================================================================
--- incubator/etch/trunk/.classpath (original)
+++ incubator/etch/trunk/.classpath Thu Feb 26 18:14:11 2009
@@ -41,6 +41,8 @@
<classpathentry kind="src" path="binding-python/compiler/src/main/resources"/>
<classpathentry kind="src" path="interoptester/src/main/java"/>
<classpathentry kind="src" path="interoptester/src/test/java"/>
+ <classpathentry kind="src" path="interoptester/example/src/main/java"/>
+ <classpathentry kind="src" path="interoptester/example/target/generated-sources/main/etch/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/ETCH_DEPENDENT_JARS"/>
<classpathentry kind="output" path="bin"/>
Modified: incubator/etch/trunk/interoptester/example/src/main/java/org/apache/etch/interoptester/example/iot/MainIOTClient.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/interoptester/example/src/main/java/org/apache/etch/interoptester/example/iot/MainIOTClient.java?rev=748254&r1=748253&r2=748254&view=diff
==============================================================================
--- incubator/etch/trunk/interoptester/example/src/main/java/org/apache/etch/interoptester/example/iot/MainIOTClient.java (original)
+++ incubator/etch/trunk/interoptester/example/src/main/java/org/apache/etch/interoptester/example/iot/MainIOTClient.java Thu Feb 26 18:14:11 2009
@@ -26,6 +26,7 @@
import org.apache.etch.interoptester.example.iot.IOTClient;
import org.apache.etch.interoptester.example.iot.IOTHelper;
import org.apache.etch.interoptester.example.iot.RemoteIOTServer;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.Description;
import org.junit.runner.JUnitCore;
@@ -59,17 +60,7 @@
if (args.length > 0)
uri = args[0];
- RemoteIOTServer server = IOTHelper.newServer( uri, null,
- new MainIOTClient() );
-
- // Connect to the service
- server._startAndWaitUp( 4000 );
-
- assertEquals( (Object) 11, server.add( 5, 6 ) );
-
- // Disconnect from the service
- server._stopAndWaitDown( 4000 );
- server = null;
+ dontStartListener = true;
JUnitCore c = new org.junit.runner.JUnitCore();
@@ -130,7 +121,17 @@
System.exit( 0 );
}
- private static String uri = "tcp://127.0.0.1:4001";
+ private static boolean dontStartListener;
+
+ private static String uri = "tcp://localhost:4001";
+
+ /** @throws Exception */
+ @BeforeClass
+ public static void beforeClass() throws Exception
+ {
+ if (!dontStartListener)
+ MainIOTListener.main( new String[] {} );
+ }
/** @throws Exception */
@org.junit.Before
Modified: incubator/etch/trunk/interoptester/example/src/main/java/org/apache/etch/interoptester/example/iot/MainIOTListener.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/interoptester/example/src/main/java/org/apache/etch/interoptester/example/iot/MainIOTListener.java?rev=748254&r1=748253&r2=748254&view=diff
==============================================================================
--- incubator/etch/trunk/interoptester/example/src/main/java/org/apache/etch/interoptester/example/iot/MainIOTListener.java (original)
+++ incubator/etch/trunk/interoptester/example/src/main/java/org/apache/etch/interoptester/example/iot/MainIOTListener.java Thu Feb 26 18:14:11 2009
@@ -48,7 +48,7 @@
System.exit( 1 );
}
- String uri = args.length > 0 ? args[0] : "tcp://127.0.0.1:4001";
+ String uri = args.length > 0 ? args[0] : "tcp://localhost:4001";
ServerFactory listener = IOTHelper.newListener( uri, null,
new MainIOTListener() );
Modified: incubator/etch/trunk/scripts/compEtchFilesForJava.bat
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/scripts/compEtchFilesForJava.bat?rev=748254&r1=748253&r2=748254&view=diff
==============================================================================
--- incubator/etch/trunk/scripts/compEtchFilesForJava.bat (original)
+++ incubator/etch/trunk/scripts/compEtchFilesForJava.bat Thu Feb 26 18:14:11 2009
@@ -66,3 +66,8 @@
@popd
@popd
+
+@pushd interoptester\example\src\main\etch
+@call %x%scripts\etch-eclipse.bat %q% %b% %n% %d% %i% IOT.etch
+@popd
+
Modified: incubator/etch/trunk/scripts/compEtchFilesForXml.bat
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/scripts/compEtchFilesForXml.bat?rev=748254&r1=748253&r2=748254&view=diff
==============================================================================
--- incubator/etch/trunk/scripts/compEtchFilesForXml.bat (original)
+++ incubator/etch/trunk/scripts/compEtchFilesForXml.bat Thu Feb 26 18:14:11 2009
@@ -66,3 +66,7 @@
@popd
@popd
+
+@pushd interoptester\example\src\main\etch
+@call %x%scripts\etch-eclipse.bat %q% %b% %n% %d% %i% IOT.etch
+@popd