File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
jboss-tck-runner/src/test/java/org/jboss/weld/tck/jbossas Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,16 @@ public void onStart(ITestContext context) {
101101 if (!result .get ("outcome" ).asString ().equals ("success" )) {
102102 throw new RuntimeException ("DataSource java:/DefaultDS was not found and could not be created automatically: " + result );
103103 }
104+ // As of AS7 7.1 we have to enable DS
105+ ModelNode enableRequest = new ModelNode ();
106+ enableRequest .get ("operation" ).set ("enable" );
107+ enableRequest .get ("address" ).get ("subsystem" ).set ("datasources" );
108+ enableRequest .get ("address" ).get ("data-source" ).set (JNDI_NAME );
109+ ModelNode enableResult = client .execute (new OperationBuilder (enableRequest ).build ());
110+ if (!enableResult .get ("outcome" ).asString ().equals ("success" )) {
111+ throw new RuntimeException ("DataSource java:/DefaultDS could not be enabled automatically: " + enableResult );
112+ }
113+
104114 } else {
105115 if (test != null && !(test .length () == 0 )) {
106116 //we do not worry about this if we are only running one test
You can’t perform that action at this time.
0 commit comments