incubator-s4-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmo...@apache.org
Subject [37/50] [abbrv] git commit: S4-128 updated existing build files and tests
Date Sat, 01 Jun 2013 11:33:27 GMT
S4-128 updated existing build files and tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-s4/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s4/commit/1495a14d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s4/tree/1495a14d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s4/diff/1495a14d

Branch: refs/heads/master
Commit: 1495a14d165fe755999c581a6a9e44cd9fc68a97
Parents: 1c62659
Author: Daniel Gómez Ferro <dferro@apache.org>
Authored: Wed Mar 13 13:23:08 2013 +0100
Committer: Daniel Gómez Ferro <dferro@apache.org>
Committed: Wed Mar 13 13:23:08 2013 +0100

----------------------------------------------------------------------
 .../s4/core/classloader/TestClassLoader.java       |    6 +++---
 .../apache/s4/deploy/TestAutomaticDeployment.java  |    8 ++++----
 .../s4/deploy/prodcon/TestProducerConsumer.java    |   12 ++++++------
 test-apps/consumer-app/build.gradle                |    2 ++
 test-apps/producer-app/build.gradle                |    2 ++
 test-apps/simple-deployable-app-1/build.gradle     |    2 ++
 test-apps/twitter-adapter/build.gradle             |    4 +++-
 test-apps/twitter-counter/build.gradle             |    2 ++
 8 files changed, 24 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
b/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
index 3e20343..81a9987 100644
--- a/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/core/classloader/TestClassLoader.java
@@ -73,9 +73,9 @@ public class TestClassLoader {
         CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
                 + "/test-apps/producer-app/build.gradle"), "s4r", new String[] { "-buildFile="
                 + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build.gradle",
-                "appClass=s4app.ProducerApp"});
+                "appClass=s4app.ProducerApp", "appName=testApp"});
 
-        Assert.assertTrue(new File(producerS4rDir, "producer-app-0.0.0-SNAPSHOT.s4r").exists());
+        Assert.assertTrue(new File(producerS4rDir, "testApp-0.0.0-SNAPSHOT.s4r").exists());
     }
 
     @Before
@@ -100,7 +100,7 @@ public class TestClassLoader {
     @Test
     public void testInitialDeploymentFromFileSystem() throws Exception {
 
-        File producerS4R = new File(producerS4rDir, "producer-app-0.0.0-SNAPSHOT.s4r");
+        File producerS4R = new File(producerS4rDir, "testApp-0.0.0-SNAPSHOT.s4r");
         String uriProducer = producerS4R.toURI().toString();
 
         initializeS4Node();

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
b/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
index 488f5f9..c4ee323 100644
--- a/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/deploy/TestAutomaticDeployment.java
@@ -79,8 +79,8 @@ public class TestAutomaticDeployment extends ZkBasedTest {
         CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
                 + "/test-apps/simple-deployable-app-1/build.gradle"), "s4r", new String[]
{ "-buildFile="
                 + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/simple-deployable-app-1/build.gradle",

-                "appClass=org.apache.s4.deploy.TestApp" });
-        Assert.assertTrue(new File(s4rDir, "simple-deployable-app-1-0.0.0-SNAPSHOT.s4r").exists());
+                "appClass=org.apache.s4.deploy.TestApp", "appName=simpleApp" });
+        Assert.assertTrue(new File(s4rDir, "simpleApp-0.0.0-SNAPSHOT.s4r").exists());
     }
 
     @Test
@@ -90,7 +90,7 @@ public class TestAutomaticDeployment extends ZkBasedTest {
 
         Assert.assertFalse(zkClient.exists(AppConstants.INITIALIZED_ZNODE_1));
 
-        final String uri = new File(s4rDir, "simple-deployable-app-1-0.0.0-SNAPSHOT.s4r").toURI().toString();
+        final String uri = new File(s4rDir, "simpleApp-0.0.0-SNAPSHOT.s4r").toURI().toString();
 
         assertDeployment(uri, zkClient, true);
 
@@ -147,7 +147,7 @@ public class TestAutomaticDeployment extends ZkBasedTest {
         File s4rToDeploy = new File(tmpDir, String.valueOf(System.currentTimeMillis()));
 
         Assert.assertTrue(ByteStreams.copy(
-                Files.newInputStreamSupplier(new File(s4rDir, "/simple-deployable-app-1-0.0.0-SNAPSHOT.s4r")),
+                Files.newInputStreamSupplier(new File(s4rDir, "/simpleApp-0.0.0-SNAPSHOT.s4r")),
                 Files.newOutputStreamSupplier(s4rToDeploy)) > 0);
 
         // we start a

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
b/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
index dd4f9ec..666db60 100644
--- a/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
+++ b/subprojects/s4-core/src/test/java/org/apache/s4/deploy/prodcon/TestProducerConsumer.java
@@ -75,9 +75,9 @@ public class TestProducerConsumer {
         CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
                 + "/test-apps/producer-app/build.gradle"), "s4r", new String[] { "-buildFile="
                 + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/producer-app/build.gradle",
-                "appClass=s4app.ProducerApp" });
+                "appClass=s4app.ProducerApp", "appName=producer" });
 
-        Assert.assertTrue(new File(producerS4rDir, "producer-app-0.0.0-SNAPSHOT.s4r").exists());
+        Assert.assertTrue(new File(producerS4rDir, "producer-0.0.0-SNAPSHOT.s4r").exists());
 
         CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
                 + "/test-apps/consumer-app/build.gradle"), "clean", new String[] { "-buildFile="
@@ -87,9 +87,9 @@ public class TestProducerConsumer {
         CoreTestUtils.callGradleTask(new File(gradlewFile.getParentFile().getAbsolutePath()
                 + "/test-apps/consumer-app/build.gradle"), "s4r", new String[] { "-buildFile="
                 + gradlewFile.getParentFile().getAbsolutePath() + "/test-apps/consumer-app/build.gradle",
-                "appClass=s4app.ConsumerApp" });
+                "appClass=s4app.ConsumerApp", "appName=consumer" });
 
-        Assert.assertTrue(new File(consumerS4rDir, "consumer-app-0.0.0-SNAPSHOT.s4r").exists());
+        Assert.assertTrue(new File(consumerS4rDir, "consumer-0.0.0-SNAPSHOT.s4r").exists());
     }
 
     @Before
@@ -122,10 +122,10 @@ public class TestProducerConsumer {
     @Test
     public void testInitialDeploymentFromFileSystem() throws Exception {
 
-        File producerS4R = new File(producerS4rDir, "producer-app-0.0.0-SNAPSHOT.s4r");
+        File producerS4R = new File(producerS4rDir, "producer-0.0.0-SNAPSHOT.s4r");
         String uriProducer = producerS4R.toURI().toString();
 
-        File consumerS4R = new File(consumerS4rDir, "consumer-app-0.0.0-SNAPSHOT.s4r");
+        File consumerS4R = new File(consumerS4rDir, "consumer-0.0.0-SNAPSHOT.s4r");
         String uriConsumer = consumerS4R.toURI().toString();
 
         initializeS4Node();

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/test-apps/consumer-app/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/consumer-app/build.gradle b/test-apps/consumer-app/build.gradle
index 69e4532..0011e7d 100644
--- a/test-apps/consumer-app/build.gradle
+++ b/test-apps/consumer-app/build.gradle
@@ -38,6 +38,7 @@
 //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+project.ext["appName"] = hasProperty('appName')? "$appName": "UNDEFINED"
 
 project.ext["s4Version"] = '0.6.0-SNAPSHOT'
 description = 'Apache S4 App'
@@ -145,6 +146,7 @@ task s4r(type: Jar) {
    dependsOn cleanCopyDependenciesToLib, copyDependenciesToLib, cleanBuildProjectJar, buildProjectJar
    from { project.libsDir }
    manifest = project.manifest
+   baseName = appName
    extension = 's4r'
    exclude '*.s4r'
    manifest.mainAttributes('S4-App-Class': appClassName)

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/test-apps/producer-app/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/producer-app/build.gradle b/test-apps/producer-app/build.gradle
index b5b25e3..fa4c2d9 100644
--- a/test-apps/producer-app/build.gradle
+++ b/test-apps/producer-app/build.gradle
@@ -38,6 +38,7 @@
 //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+project.ext["appName"] = hasProperty('appName')? "$appName": "UNDEFINED"
 
 project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
@@ -145,6 +146,7 @@ task s4r(type: Jar) {
    dependsOn cleanCopyDependenciesToLib, copyDependenciesToLib, cleanBuildProjectJar, buildProjectJar
    from { project.libsDir }
    manifest = project.manifest
+   baseName = appName
    extension = 's4r'
    exclude '*.s4r'
    manifest.mainAttributes('S4-App-Class': appClassName)

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/test-apps/simple-deployable-app-1/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/simple-deployable-app-1/build.gradle b/test-apps/simple-deployable-app-1/build.gradle
index 069f969..e7f6a9f 100644
--- a/test-apps/simple-deployable-app-1/build.gradle
+++ b/test-apps/simple-deployable-app-1/build.gradle
@@ -38,6 +38,7 @@
 //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+project.ext["appName"] = hasProperty('appName')? "$appName": "UNDEFINED"
 
 project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
@@ -145,6 +146,7 @@ task s4r(type: Jar) {
    dependsOn cleanCopyDependenciesToLib, copyDependenciesToLib, cleanBuildProjectJar, buildProjectJar
    from { project.libsDir }
    manifest = project.manifest
+   baseName = appName
    extension = 's4r'
    exclude '*.s4r'
    

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/test-apps/twitter-adapter/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/twitter-adapter/build.gradle b/test-apps/twitter-adapter/build.gradle
index 3f68930..0d93fd0 100644
--- a/test-apps/twitter-adapter/build.gradle
+++ b/test-apps/twitter-adapter/build.gradle
@@ -38,6 +38,7 @@
 //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+project.ext["appName"] = hasProperty('appName')? "$appName": "UNDEFINED"
 
 project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
@@ -46,7 +47,7 @@ project.ext["distRootFolder"] = "$archivesBaseName-${-> version}"
 
 
 // Append the suffix 'SNAPSHOT' when the build is not for release.
-//version = new Version(major: 0, minor: 0, bugfix: 0, isRelease: false)
+version = new Version(major: 0, minor: 0, bugfix: 0, isRelease: false)
 group = 'org.apache.s4'
 
 apply plugin: 'java'
@@ -131,6 +132,7 @@ task s4r(type: Jar) {
    dependsOn cleanCopyDependenciesToLib, copyDependenciesToLib, cleanBuildProjectJar, buildProjectJar
    from { project.libsDir }
    manifest = project.manifest
+   baseName = appName
    extension = 's4r'
    exclude '*.s4r'
    manifest.mainAttributes('S4-App-Class': appClassName)

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/1495a14d/test-apps/twitter-counter/build.gradle
----------------------------------------------------------------------
diff --git a/test-apps/twitter-counter/build.gradle b/test-apps/twitter-counter/build.gradle
index dde352a..58d125f 100644
--- a/test-apps/twitter-counter/build.gradle
+++ b/test-apps/twitter-counter/build.gradle
@@ -38,6 +38,7 @@
 //s4AppInstallDir = "/tmp/s4Apps" // TODO: decide how to standarize dirs, use env var?
 
 project.ext["appClassName"] = hasProperty('appClass')? "$appClass": "UNDEFINED"
+project.ext["appName"] = hasProperty('appName')? "$appName": "UNDEFINED"
 
 project.ext["s4Version"] = '0.6.0-incubating'
 description = 'Apache S4 App'
@@ -129,6 +130,7 @@ task s4r(type: Jar) {
    dependsOn cleanCopyDependenciesToLib, copyDependenciesToLib, cleanBuildProjectJar, buildProjectJar
    from { project.libsDir }
    manifest = project.manifest
+   baseName = appName
    extension = 's4r'
    exclude '*.s4r'
    manifest.mainAttributes('S4-App-Class': appClassName)


Mime
View raw message