[jboss-cvs] JBossAS SVN: r114751 - branches/JBPAPP_5/testsuite/src/main/org/jboss/test/jca/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 5 10:41:01 EST 2014


Author: pjelinek
Date: 2014-03-05 10:41:01 -0500 (Wed, 05 Mar 2014)
New Revision: 114751

Modified:
   branches/JBPAPP_5/testsuite/src/main/org/jboss/test/jca/test/HAConnectionFactoryUnitTestCase.java
Log:
[JBPAPP-11021] Test temporary failed to avoid whole testsuite be stuck. 
You can run the test with -Djbosstest.runTestFailoverLocalMCF=true 

Modified: branches/JBPAPP_5/testsuite/src/main/org/jboss/test/jca/test/HAConnectionFactoryUnitTestCase.java
===================================================================
--- branches/JBPAPP_5/testsuite/src/main/org/jboss/test/jca/test/HAConnectionFactoryUnitTestCase.java	2014-02-27 16:08:18 UTC (rev 114750)
+++ branches/JBPAPP_5/testsuite/src/main/org/jboss/test/jca/test/HAConnectionFactoryUnitTestCase.java	2014-03-05 15:41:01 UTC (rev 114751)
@@ -27,6 +27,7 @@
 
 import java.util.Arrays;
 
+import junit.framework.Assert;
 import junit.framework.Test;
 
 
@@ -47,13 +48,17 @@
       super(name);
    }
 
+   private static final Boolean runTestFailoverLocalMCF = Boolean.valueOf(System.getProperty("jbosstest.runTestFailoverLocalMCF"));
+   
    public static Test suite() throws Exception
    {
       Test t;
       t = getDeploySetup(HAConnectionFactoryUnitTestCase.class, "jcatest.jar");
 	  //t = getDeploySetup(t, "jboss-ha-local-jdbc.rar");
-      //t = getDeploySetup(t, "jboss-ha-xa-jdbc.rar");	
-      //t = getDeploySetup(t, "test-ha-ds.xml");
+      //t = getDeploySetup(t, "jboss-ha-xa-jdbc.rar");
+      if(runTestFailoverLocalMCF) {
+    	  t = getDeploySetup(t, "test-ha-ds.xml");
+      }
       t = getDeploySetup(t, "test-ha-xa-ds.xml");
       t = getDeploySetup(t, "jbosstestadapter.rar");
 	  t = getDeploySetup(t, "jca-support.sar");
@@ -66,13 +71,18 @@
       //t = getDeploySetup(t, new File(connectorLib + "jboss-ha-xa-jdbc.rar").toURL().toString());
       return t;
    }
-/*
+
    public void testFailoverLocalMCF() throws Exception
    {
-      HAConnectionSessionHome home = (HAConnectionSessionHome)getInitialContext().lookup("HAConnectionSession");
-      home.create().testHaLocalConnection();
+	  if(runTestFailoverLocalMCF) {
+		  HAConnectionSessionHome home = (HAConnectionSessionHome)getInitialContext().lookup("HAConnectionSession");
+	      home.create().testHaLocalConnection(); 
+	  }else {
+		  Assert.fail("Test temporary failed to avoid whole testsuite be stuck. You can run the test with -Djbosstest.runTestFailoverLocalMCF=true See https://issues.jboss.org/browse/JBPAPP-11021");
+	  }
+      
    }
-*/   
+   
    public void testFailoverXaMCF() throws Exception
    {
       HAConnectionSessionHome home = (HAConnectionSessionHome)getInitialContext().lookup("HAConnectionSession");



More information about the jboss-cvs-commits mailing list