incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1075364 - in /sling/trunk/testing: junit/remote/src/main/java/org/apache/sling/junit/remote/testrunner/ samples/integration-tests/src/test/java/org/apache/sling/testing/samples/testtools/serverside/
Date Mon, 28 Feb 2011 15:04:50 GMT
Author: bdelacretaz
Date: Mon Feb 28 15:04:49 2011
New Revision: 1075364

URL: http://svn.apache.org/viewvc?rev=1075364&view=rev
Log:
SLING-1963 - do not check number of tests if < 0

Added:
    sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/testtools/serverside/DontCareForTestsCountTest.java
  (with props)
Modified:
    sling/trunk/testing/junit/remote/src/main/java/org/apache/sling/junit/remote/testrunner/SlingRemoteTestRunner.java
    sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/testtools/serverside/ServerSideSampleTest.java

Modified: sling/trunk/testing/junit/remote/src/main/java/org/apache/sling/junit/remote/testrunner/SlingRemoteTestRunner.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/junit/remote/src/main/java/org/apache/sling/junit/remote/testrunner/SlingRemoteTestRunner.java?rev=1075364&r1=1075363&r2=1075364&view=diff
==============================================================================
--- sling/trunk/testing/junit/remote/src/main/java/org/apache/sling/junit/remote/testrunner/SlingRemoteTestRunner.java
(original)
+++ sling/trunk/testing/junit/remote/src/main/java/org/apache/sling/junit/remote/testrunner/SlingRemoteTestRunner.java
Mon Feb 28 15:04:49 2011
@@ -97,9 +97,11 @@ public class SlingRemoteTestRunner exten
                 testParameters.getJunitServletUrl(), testHttpClient.getTestExecutionPath());
         
         // Check that number of tests is as expected
-        assertEquals("Expecting " + testParameters.getExpectedNumberOfTests() + " tests",
-                testParameters.getExpectedNumberOfTests(),
-                children.size());
+        if(testParameters.getExpectedNumberOfTests() >= 0) {
+            assertEquals("Expecting " + testParameters.getExpectedNumberOfTests() + " tests",
+                    testParameters.getExpectedNumberOfTests(),
+                    children.size());
+        }
     }
     
     @Override

Added: sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/testtools/serverside/DontCareForTestsCountTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/testtools/serverside/DontCareForTestsCountTest.java?rev=1075364&view=auto
==============================================================================
--- sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/testtools/serverside/DontCareForTestsCountTest.java
(added)
+++ sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/testtools/serverside/DontCareForTestsCountTest.java
Mon Feb 28 15:04:49 2011
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.testing.samples.testtools.serverside;
+
+import org.apache.sling.junit.remote.testrunner.SlingRemoteTestRunner;
+import org.junit.runner.RunWith;
+
+/** Run server-side tests from the sampletests bundle */
+@RunWith(SlingRemoteTestRunner.class)
+public class DontCareForTestsCountTest extends ServerSideSampleTest {
+    
+    public int getExpectedNumberOfTests() {
+        // Negative value here means "don't care", check that
+        // this test passes with this value 
+        return -1;
+    }
+}
\ No newline at end of file

Propchange: sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/testtools/serverside/DontCareForTestsCountTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/testtools/serverside/DontCareForTestsCountTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Modified: sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/testtools/serverside/ServerSideSampleTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/testtools/serverside/ServerSideSampleTest.java?rev=1075364&r1=1075363&r2=1075364&view=diff
==============================================================================
--- sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/testtools/serverside/ServerSideSampleTest.java
(original)
+++ sling/trunk/testing/samples/integration-tests/src/test/java/org/apache/sling/testing/samples/testtools/serverside/ServerSideSampleTest.java
Mon Feb 28 15:04:49 2011
@@ -20,7 +20,7 @@ import org.apache.sling.junit.remote.tes
 import org.apache.sling.junit.remote.testrunner.SlingRemoteTestRunner;
 import org.junit.runner.RunWith;
 
-/** Run server-side tests from the sampletests bundle */
+/** Verify that getExpectedNumberOfTests() < 0 means "don't care" */
 @RunWith(SlingRemoteTestRunner.class)
 public class ServerSideSampleTest extends ServerSideTestsBase implements SlingRemoteTestParameters
{
     



Mime
View raw message