"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ejb3/src/test/java/org/jboss/as/ejb3/subsystem/Ejb3SubsystemUnitTestCase.java" between
wildfly-21.0.0.Final-src.zip and wildfly-21.0.1.Final-src.zip

About: WildFly is an application server with a standards-compliant, fast and lightweight implementation of the Java Enterprise Edition 7 Platform specifications (formerly known as JBoss community version). Sources.

Ejb3SubsystemUnitTestCase.java  (wildfly-21.0.0.Final-src):Ejb3SubsystemUnitTestCase.java  (wildfly-21.0.1.Final-src)
skipping to change at line 139 skipping to change at line 139
steps.add(writeMax); steps.add(writeMax);
steps.add(writeDerive); steps.add(writeDerive);
ks.executeForFailure(composite); ks.executeForFailure(composite);
validatePoolConfig(ks, pa); validatePoolConfig(ks, pa);
} }
@Test
public void testDefaultPools() throws Exception {
final String subsystemXml = readResource("subsystem-pools.xml");
final KernelServices ks = createKernelServicesBuilder(AdditionalInitiali
zation.MANAGEMENT).setSubsystemXml(subsystemXml).build();
Assert.assertTrue("Subsystem boot failed!", ks.isSuccessfulBoot());
// add a test pool
String testPoolName = "test-pool";
final PathAddress ejb3Address = PathAddress.pathAddress("subsystem", "ej
b3");
PathAddress testPoolAddress = ejb3Address.append("strict-max-bean-instan
ce-pool", testPoolName);
final ModelNode addPool = Util.createAddOperation(testPoolAddress);
ModelNode response = ks.executeOperation(addPool);
Assert.assertEquals(response.toString(), "success", response.get("outcom
e").asString());
// set default-mdb-instance-pool
writeAndReadPool(ks, ejb3Address, "default-mdb-instance-pool", testPoolN
ame);
writeAndReadPool(ks, ejb3Address, "default-mdb-instance-pool", null);
writeAndReadPool(ks, ejb3Address, "default-mdb-instance-pool", null);
writeAndReadPool(ks, ejb3Address, "default-mdb-instance-pool", "mdb-stri
ct-max-pool");
// set default-slsb-instance-pool
writeAndReadPool(ks, ejb3Address, "default-slsb-instance-pool", null);
writeAndReadPool(ks, ejb3Address, "default-slsb-instance-pool", null);
writeAndReadPool(ks, ejb3Address, "default-slsb-instance-pool", testPool
Name);
writeAndReadPool(ks, ejb3Address, "default-slsb-instance-pool", testPool
Name);
writeAndReadPool(ks, ejb3Address, "default-slsb-instance-pool", "slsb-st
rict-max-pool");
final ModelNode removePool = Util.createRemoveOperation(testPoolAddress)
;
response = ks.executeOperation(removePool);
Assert.assertEquals(response.toString(), "success", response.get("outcom
e").asString());
}
private void writeAndReadPool(KernelServices ks, PathAddress ejb3Address, St
ring attributeName, String testPoolName) {
ModelNode writeAttributeOperation = testPoolName == null ?
Util.getUndefineAttributeOperation(ejb3Address, attributeName) :
Util.getWriteAttributeOperation(ejb3Address, attributeName, test
PoolName);
ModelNode response = ks.executeOperation(writeAttributeOperation);
Assert.assertEquals(response.toString(), "success", response.get("outcom
e").asString());
final String expectedPoolName = testPoolName == null ? "undefined" : tes
tPoolName;
final ModelNode readAttributeOperation = Util.getReadAttributeOperation(
ejb3Address, attributeName);
response = ks.executeOperation(readAttributeOperation);
final String poolName = response.get("result").asString();
Assert.assertEquals("Unexpected pool name", expectedPoolName, poolName);
}
private void validatePoolConfig(KernelServices ks, PathAddress pa) { private void validatePoolConfig(KernelServices ks, PathAddress pa) {
ModelNode ra = Util.createEmptyOperation("read-attribute", pa); ModelNode ra = Util.createEmptyOperation("read-attribute", pa);
ra.get("name").set("max-pool-size"); ra.get("name").set("max-pool-size");
ModelNode response = ks.executeOperation(ra); ModelNode response = ks.executeOperation(ra);
Assert.assertEquals(response.toString(), 5, response.get("result").asInt ()); Assert.assertEquals(response.toString(), 5, response.get("result").asInt ());
ra.get("name").set("derive-size"); ra.get("name").set("derive-size");
response = ks.executeOperation(ra); response = ks.executeOperation(ra);
Assert.assertFalse(response.toString(), response.hasDefined("result")); Assert.assertFalse(response.toString(), response.hasDefined("result"));
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 62 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)