EJB - org.jboss.as.ejb3.pool.strictmax.StrictMaxUnitTestCase accidentally failed (race-condition?)
by Pavel Janousek
Hi,
I've got for the first time (and only one) that testcase org.jboss.as.ejb3.pool.strictmax.StrictMaxUnitTestCase accidentally failed - see stacktrace bellow.
Because it is some multithread testcase, it is possible that this accident should be a race-condition error.
Could someone who is expert of this part of AS7 code review if there isn't really some issue?
Thanks
Pavel
-------------------------------------------------------------------------------
Test set: org.jboss.as.ejb3.pool.strictmax.StrictMaxUnitTestCase
-------------------------------------------------------------------------------
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.067 sec <<< FAILURE!
testMultiThread(org.jboss.as.ejb3.pool.strictmax.StrictMaxUnitTestCase) Time elapsed: 2.031 sec <<< FAILURE!
junit.framework.AssertionFailedError: expected:<10> but was:<9>
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.Assert.failNotEquals(Assert.java:287)
at junit.framework.Assert.assertEquals(Assert.java:67)
at junit.framework.Assert.assertEquals(Assert.java:199)
at junit.framework.Assert.assertEquals(Assert.java:205)
at org.jboss.as.ejb3.pool.strictmax.StrictMaxUnitTestCase.testMultiThread(StrictMaxUnitTestCase.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
--
Pavel Janousek
Senior JBoss QA Engineer
12 years, 9 months
Port assignments
by Ondrej Zizka
Hi,
came to my mind when changing testsuite's port config:
1) Default HTTPS port is 8443, default console's HTTPS port is 9443.
That would cause collision if user has 2 instances and uses port offset
of 1000, which is quite likely.
2) JGroups uses default ports up to 57600, which disallows using offset
higher than 7000 and something.
Why don't we use successive numbers like 17200, 17201,
17202, ... ?
Are (non-standard) ports assigned as per individual's random choice, or
is there some reasoning behind it?
Thanks,
Ondra
12 years, 9 months
Hardcoded localhost - leftovers
by Ondrej Zizka
Hi all,
there are still some tests containing hard-coded localhost.
If you happen to be the author/culprit, please check if the tests should
be updated (most likely it should) to use an appropriate dynamic
mechanism to get the right address, and update it.
@ArquillianResource URL url;
@ArquillianResource ManagementClient mc;
@ContainerResource private ManagementClient mc;
The values in annotations will probably need some trick like this:
https://github.com/jbossas/jboss-as/commit/a2b0b7b4220bd3e781389b7262f46a...
Or, if no other way, using javassist (or byteman) to inject a constant
into a static field and use that in the annotation.
Thanks to Stuart, Richard, and all who contributed to this.
Ondra
testsuite/integration/smoke/src/test/java/org/jboss/as/test/smoke/mgmt/datasource/DataSourceOperationsUnitTestCase.java:
MBeanServerConnection mbeanServer =
JMXConnectorFactory.connect(new
JMXServiceURL("service:jmx:remoting-jmx://127.0.0.1:9999")).getMBeanServerConnection();
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java: prope.put(Context.PROVIDER_URL, "corbaloc::localhost:3528/JBoss/Naming/root");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java: prope.put(Context.PROVIDER_URL, "corbaloc::localhost:3528/JBoss/Naming/root");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java: prope.put(Context.PROVIDER_URL, "corbaloc::localhost:3528");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java: final Object iiopObj = context.lookup("corbaname:iiop:localhost:3528#test/IIOPNamingBean");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java: prope.put(Context.PROVIDER_URL, "corbaloc::localhost:3528");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java: prope.put(Context.PROVIDER_URL, "iiop://localhost:3528");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java: prope.put(Context.PROVIDER_URL, "iiop://localhost:3528");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java: prope.put(Context.PROVIDER_URL, "corbaloc::localhost:3528/JBoss/Naming/root");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java: prope.put(Context.PROVIDER_URL, "corbaloc::localhost:3528");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java: final Object iiopObj = context.lookup("corbaname:iiop:localhost:3528#bean/custom/name/IIOPNamingBean");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java: prope.put(Context.PROVIDER_URL, "iiop://localhost:3528");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jmx/ModelControllerMBeanTestCase.java: static final String HOST = "localhost";
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jmx/ModelControllerMBeanTestCase.java: client = ModelControllerClient.Factory.create("localhost", 9999, getCallbackHandler());
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/osgi/jaxrs/RestEasyIntegrationTestCase.java: String reqPath = "http://" + formatPossibleIpv6Address(System.getProperty("test.bind.address", "localhost")) + ":8080/resteasy-osgi-client/rest/echo
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/security/loginmodules/DatabaseLoginModuleTestCase.java: conn = DriverManager.getConnection("jdbc:h2:tcp://localhost/mem:test" + depNum, "sa", "sa");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/security/loginmodules/common/servlets/SecuredServletWithDBSetupForDep1.java: url = "jdbc:h2:tcp://localhost/mem:test1"
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/security/loginmodules/common/servlets/SecuredServletWithDBSetupForDep2.java: url = "jdbc:h2:tcp://localhost/mem:test2"
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/security/loginmodules/common/servlets/SecuredServletWithDBSetupForDep3.java: url = "jdbc:h2:tcp://localhost/mem:test3"
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/security/loginmodules/common/servlets/SecuredServletWithDBSetupForDep4.java: url = "jdbc:h2:tcp://localhost/mem:test4"
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/web/security/cert/WebSecurityCERTTestCase.java: protected final String URL = "https://localhost:8380/" + getContextPath() + "/secured/";
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/web/security/cert/WebSecurityCERTTestCase.java: protected final String URL = "https://localhost:8380/" + getContextPath() + "/secured/";
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/web/security/tg/TransportGuaranteeTestCase.java: FileUtils.copyURLToFile(tccl.getResource("web/sec/tg/localhost.keystore"), keyStoreFile);
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ws/serviceref/TestService.wsdl: <soap:address location='http://${node0:localhost}:8080/ws-serviceref-example/EndpointService/EJB3Bean'/>
testsuite/integration/iiop/src/test/java/org/jboss/as/test/iiop/basic/BasicIIOPInvocationTestCase.java: * @EJB(lookup = "corbaname:iiop:localhost:3628#IIOPTransactionalStatelessBean")
testsuite/integration/smoke/src/test/java/org/jboss/as/test/smoke/webservices/SimpleStatelessSessionBean.java: @WebServiceRef(wsdlLocation="http://localhost:8080/ws-example?wsdl", value=EndpointService.class)
testsuite/integration/smoke/src/test/java/org/jboss/as/test/smoke/webservices/SimpleStatelessSessionBean.java: @WebServiceRef(wsdlLocation="http://localhost:8080/ws-example?wsdl", value=EndpointService.class)
testsuite/integration/src/test/xslt/addRemoteOutboundConnection.xsl:
<xsl:param name="node" select="'localhost'"/>
12 years, 9 months
Default Context
by Darran Lofthouse
I have been wondering if it could make sense to allow the default
context to be specified for web apps deployed to AS7.
At the moment we have the welcome context, this can be switched of and
an alternative app deployed to the root context - some users use this to
deploy an app that redirects to their app.
Could it make sense within the config to specify the context / URL to
redirect to if users access the root context?
Regards,
Darran Lofthouse.
12 years, 9 months
Configuration changes
by Kabir Khan
domain.xml and standalone-XXX.xml are now generated from templates and subsystem snippets (apart from standalone-minimal.xml). I've verified as best I can that we're generating good configs but please see build/src/main/resources/configuration/ReadMe.txt and take a moment to verify your subsystem configurations look the way you want and let me know if there are any problems.
I have left the old configurations in build/src/main/resources/configuration/retired-delete-once-stable for now, with http://issues.jboss.org/browse/AS7-3853 to remind me to delete them in the not too distant future. The old configs don't get used at all, they are just there as a handy reference in case of inconsistencies.
12 years, 9 months
Re: [jboss-as7-dev] System property replacement in deployment descriptors
by Oleg Kulikov
Hi Jaikiran,
Can you explain more details about your vision of the property replacement
task. In general it is interested how deep it should be shared between
different substems where xml descriptors are used. Should it be a common
parsing utility with description which properies allow expressions or it
may be just a simple utility method shared between parsing methods?
-- Oleg.
12 years, 9 months
recent master: missing service dependencies
by Heiko Braun
taken from the boot log:
[Server:server-one] 12:56:25,895 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
[Server:server-one] JBAS014775: New missing/unsatisfied dependencies:
[Server:server-one] service jboss.binding.jacorb (missing) dependents: [service jboss.jacorb.orb-service]
[Server:server-one] service jboss.binding.jacorb-ssl (missing) dependents: [service jboss.jacorb.orb-service]
[Server:server-one] service jboss.binding.messaging (missing) dependents: [service jboss.messaging.default]
[Server:server-one] service jboss.binding.messaging-throughput (missing) dependents: [service jboss.messaging.default]
[Server:server-one]
12 years, 9 months
Console build: development profile
by Heiko Braun
Due to the increased number of permutations (additional languages) the full compile times have increased quiet drastically. To work around this problem during development, I've added a development build profile that restricts the languages to english and the browser permutations to safari and firefox:
mvn -Pdev clean install
Usually it's fine to run hosted mode for development, but when it becomes necessary to build the final app you can use the above profile to quickly build a console version with above constraints.
Regards, Heiko
12 years, 9 months