qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject svn commit: r950730 - /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
Date Wed, 02 Jun 2010 19:13:41 GMT
Author: robbie
Date: Wed Jun  2 19:13:40 2010
New Revision: 950730

URL: http://svn.apache.org/viewvc?rev=950730&view=rev
Log:
QPID-2639: copy the old QpidTestCase@950614 to the new QpidBrokerTestCase, removing the exclusion
features now handled by the new QpidTestCase

Added:
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
  (contents, props changed)
      - copied, changed from r950614, qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java

Copied: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
(from r950614, qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java?p2=qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java&p1=qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java&r1=950614&r2=950730&rev=950730&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
Wed Jun  2 19:13:40 2010
@@ -76,12 +76,12 @@ import org.apache.qpid.util.LogMonitor;
 /**
  * Qpid base class for system testing test cases.
  */
-public class QpidTestCase extends TestCase
+public class QpidBrokerTestCase extends QpidTestCase
 {
     protected final String QpidHome = System.getProperty("QPID_HOME");
     protected File _configFile = new File(System.getProperty("broker.config"));
 
-    protected static final Logger _logger = Logger.getLogger(QpidTestCase.class);
+    protected static final Logger _logger = Logger.getLogger(QpidBrokerTestCase.class);
     protected static final int LOGMONITOR_TIMEOUT = 5000;
 
     protected long RECEIVE_TIMEOUT = 1000l;
@@ -96,62 +96,10 @@ public class QpidTestCase extends TestCa
     protected static final String INDEX = "index";
     protected static final String CONTENT = "content";
 
-    /**
-     * Some tests are excluded when the property test.excludes is set to true.
-     * An exclusion list is either a file (prop test.excludesfile) which contains one test
name
-     * to be excluded per line or a String (prop test.excludeslist) where tests to be excluded
are
-     * separated by " ". Excluded tests are specified following the format:
-     * className#testName where className is the class of the test to be
-     * excluded and testName is the name of the test to be excluded.
-     * className#* excludes all the tests of the specified class.
-     */
     private static final String DEFAULT_INITIAL_CONTEXT = "org.apache.qpid.jndi.PropertiesFileInitialContextFactory";
 
     static
     {
-        if (Boolean.getBoolean("test.exclude"))
-        {
-            _logger.info("Some tests should be excluded, building the exclude list");
-            String exclusionListURIs = System.getProperties().getProperty("test.excludefiles",
"");
-            String exclusionListString = System.getProperties().getProperty("test.excludelist",
"");
-            List<String> exclusionList = new ArrayList<String>();
-
-            for (String uri : exclusionListURIs.split("\\s+"))
-            {
-                File file = new File(uri);
-                if (file.exists())
-                {
-                    _logger.info("Using exclude file: " + uri);
-                    try
-                    {
-                        BufferedReader in = new BufferedReader(new FileReader(file));
-                        String excludedTest = in.readLine();
-                        do
-                        {
-                            exclusionList.add(excludedTest);
-                            excludedTest = in.readLine();
-                        }
-                        while (excludedTest != null);
-                    }
-                    catch (IOException e)
-                    {
-                        _logger.warn("Exception when reading exclusion list", e);
-                    }
-                }
-            }
-
-            if (!exclusionListString.equals(""))
-            {
-                _logger.info("Using excludeslist: " + exclusionListString);
-                for (String test : exclusionListString.split("\\s+"))
-                {
-                    exclusionList.add(test);
-                }
-            }
-
-            _exclusionList = exclusionList;
-        }
-
         String initialContext = System.getProperty(InitialContext.INITIAL_CONTEXT_FACTORY);
 
         if (initialContext == null || initialContext.length() == 0)
@@ -160,8 +108,6 @@ public class QpidTestCase extends TestCa
         }
     }
 
-    private static List<String> _exclusionList;
-
     // system properties
     private static final String BROKER_LANGUAGE = "broker.language";
     private static final String BROKER = "broker";
@@ -236,19 +182,19 @@ public class QpidTestCase extends TestCa
     }
     private MessageType _messageType  = MessageType.TEXT;
 
-    public QpidTestCase(String name)
+    public QpidBrokerTestCase(String name)
     {
         super(name);
     }
-
-    public QpidTestCase()
+    
+    public QpidBrokerTestCase()
     {
-        this("QpidTestCase");
+        super();
     }
-	
+    
 	public Logger getLogger()
 	{
-		return QpidTestCase._logger;
+		return QpidBrokerTestCase._logger;
 	}
 
     public void runBare() throws Throwable
@@ -344,21 +290,6 @@ public class QpidTestCase extends TestCa
         startBroker();
     }
 
-    public void run(TestResult testResult)
-    {
-        if (_exclusionList != null && (_exclusionList.contains(getClass().getPackage().getName()
+ ".*") ||
-                                       _exclusionList.contains(getClass().getName() + "#*")
||
-                                       _exclusionList.contains(getClass().getName() + "#"
+ getName())))
-        {
-            _logger.info("Test: " + getName() + " is excluded");
-            testResult.endTest(this);
-        }
-        else
-        {
-            super.run(testResult);
-        }
-    }
-
     private static final class Piper extends Thread
     {
 

Propchange: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Wed Jun  2 19:13:40 2010
@@ -0,0 +1,5 @@
+/qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java:886720-886722,887145,892761,894875,916304,916325,930288,931179
+/qpid/branches/0.5.x-dev/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java:886720-886722
+/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java:795950-829653
+/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java:805429-821809
+/qpid/trunk/qpid/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java:796646-796653



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message