Bug 682878 - get build running (including all tests passing) on JDK 7 / Java 7
get build running (including all tests passing) on JDK 7 / Java 7
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Build System (Show other bugs)
JON 3.1.1
All All
urgent Severity medium
: ---
: JON 3.1.2
Assigned To: Heiko W. Rupp
Mike Foley
:
Depends On: 797252 838681 839256 839274 846049 846715 848168 848399 850744 852094 852815
Blocks: 726720
  Show dependency treegraph
 
Reported: 2011-03-07 15:52 EST by Ian Springer
Modified: 2013-09-11 07:00 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-11 07:00:59 EDT
Type: Task
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ian Springer 2011-03-07 15:52:35 EST
The main potential advantage of this is a decrease in build time, since JDK7 has better performance than JDK6. Note, running the Server and Agent on JDK7 is another story, and a separate task from this one.

I already spent some time on this a few months ago. I got the whole build to compile with the exception of the remoting/webservices module, where the JAX-WS compilation fails due to some JAXB errors. As far as the unit tests, the below failover list tests are the only ones failing. So we're very close to the full build working with JDK7. 

Tests run: 288, Failures: 3, Errors: 0, Skipped: 0, Time elapsed:
245.666 sec <<< FAILURE!
testGetForAllAgents5_10(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
Time elapsed: 0.217 sec <<< FAILURE!
java.lang.AssertionError
    at
org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest.validateBalance(FailoverListManagerBeanTest.java:244)
    at
org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest.testGetForAllAgents5_10(FailoverListManagerBeanTest.java:429)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:613)
    at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:607)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:517)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:669)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:956)
    at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
    at org.testng.TestRunner.runWorkers(TestRunner.java:759)
    at org.testng.TestRunner.privateRun(TestRunner.java:592)
    at org.testng.TestRunner.run(TestRunner.java:486)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
    at org.testng.SuiteRunner.run(SuiteRunner.java:204)
    at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
    at org.testng.TestNG.run(TestNG.java:751)
    at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
    at
org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:613)
    at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
    at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)

testGetForAllAgents20_1000(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
Time elapsed: 20.213 sec <<< FAILURE!
java.lang.AssertionError
    at
org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest.validateBalance(FailoverListManagerBeanTest.java:244)
    at
org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest.testGetForAllAgents20_1000(FailoverListManagerBeanTest.java:457)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:613)
    at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:607)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:517)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:669)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:956)
    at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
    at org.testng.TestRunner.runWorkers(TestRunner.java:759)
    at org.testng.TestRunner.privateRun(TestRunner.java:592)
    at org.testng.TestRunner.run(TestRunner.java:486)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
    at org.testng.SuiteRunner.run(SuiteRunner.java:204)
    at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
    at org.testng.TestNG.run(TestNG.java:751)
    at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
    at
org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:613)
    at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
    at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)

testGetForAllAgents5_25(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
Time elapsed: 0.253 sec <<< FAILURE!
java.lang.AssertionError
    at
org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest.validateBalance(FailoverListManagerBeanTest.java:244)
    at
org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest.testGetForAllAgents5_25(FailoverListManagerBeanTest.java:439)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:613)
    at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:607)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:517)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:669)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:956)
    at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
    at org.testng.TestRunner.runWorkers(TestRunner.java:759)
    at org.testng.TestRunner.privateRun(TestRunner.java:592)
    at org.testng.TestRunner.run(TestRunner.java:486)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
    at org.testng.SuiteRunner.run(SuiteRunner.java:204)
    at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
    at org.testng.TestNG.run(TestNG.java:751)
    at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
    at
org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:613)
    at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
    at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)


Results :

Failed tests:

testGetForAllAgents5_10(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)

testGetForAllAgents20_1000(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)

testGetForAllAgents5_25(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)

Tests run: 288, Failures: 3, Errors: 0, Skipped: 0 



The best person to look at the JAX-WS/JAXB errors is Simeon, and the best person to look at the failing HA tests is Jay.
Comment 1 Ian Springer 2011-03-07 15:53:44 EST
A comment from Jay regarding the failing HA tests:

Not sure why they are failing, without trying it out but my guess would be that maybe something changed in some randomization or something and we're not getting the same balancing as expected.  That algorithm was not very good to begin with, perhaps I should revisit this.  I was looking into changing the logic a while back but never got a chance to finish it. It's kind of confusing, takes a deep dive....
Comment 2 Ian Springer 2012-03-07 15:32:07 EST
I'm now seeing some additional server-jar test failures in master:

Failed tests:   testGetForAllAgents20_1000(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
  testGetForAllAgents5_10(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
  testGetForAllAgents5_25(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
  testGetForSingleAgent_new_1(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
  testGetForSingleAgent_new_2(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
  testGetForSingleAgent_new_3(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
  packageType(org.rhq.enterprise.server.configuration.DynamicConfigurationPropertyBeanTest): Expected: 19, Found: 18
  afterMethod(org.rhq.enterprise.server.configuration.LargeGroupResourceConfigurationTest): java.lang.NullPointerException
  testAgentBackfillNewResource(org.rhq.enterprise.server.measurement.test.AvailabilityManagerTest): java.lang.reflect.UndeclaredThrowableException
  testPurgeAvailabilities(org.rhq.enterprise.server.measurement.test.AvailabilityManagerTest): Didn't purge 1 --> 519
  testSimpleSubCategoryCreate(org.rhq.enterprise.server.resource.metadata.test.UpdateResourceSubsystemTest)
  testSingleSubCategoryAddSibling(org.rhq.enterprise.server.resource.metadata.test.UpdateResourceSubsystemTest)

Tests run: 492, Failures: 12, Errors: 0, Skipped: 0


It's very possible some of these aren't Java 7 related. In any case, we should get them passing.
Comment 3 Ian Springer 2012-03-08 09:57:13 EST
I just ran the server-jar tests on Java 6 and saw many of the same failures. Here are the failures that occurred on both Java 7 and Java 6:

testGetForSingleAgent_new_1(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
  testGetForSingleAgent_new_2(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
  testGetForSingleAgent_new_3(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
  packageType(org.rhq.enterprise.server.configuration.DynamicConfigurationPropertyBeanTest): Expected: 19, Found: 18
    afterMethod(org.rhq.enterprise.server.configuration.LargeGroupResourceConfigurationTest)
  testSimpleSubCategoryCreate(org.rhq.enterprise.server.resource.metadata.test.UpdateResourceSubsystemTest)
  testSingleSubCategoryAddSibling(org.rhq.enterprise.server.resource.metadata.test.UpdateResourceSubsystemTest)

Here's the failures that only occurred on Java 6:

beforeMethod(org.rhq.enterprise.server.configuration.LargeGroupPluginConfigurationTest)
  afterMethod(org.rhq.enterprise.server.configuration.LargeGroupPluginConfigurationTest)
  beforeMethod(org.rhq.enterprise.server.configuration.LargeGroupResourceConfigurationTest) 

*******************************************************************************
And here's the failures that only occurred on Java 7 (these are the ones we need to look into for purposes of this BZ):

testAgentBackfillNewResource(org.rhq.enterprise.server.measurement.test.AvailabilityManagerTest):
java.lang.reflect.UndeclaredThrowableException
 
testPurgeAvailabilities(org.rhq.enterprise.server.measurement.test.AvailabilityManagerTest):
Didn't purge 1 --> 519

testGetForAllAgents20_1000(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
 
testGetForAllAgents5_10(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
 
testGetForAllAgents5_25(org.rhq.enterprise.server.cloud.FailoverListManagerBeanTest)
*******************************************************************************
Comment 5 Ian Springer 2012-03-14 11:01:46 EDT
They failed for me locally.
Comment 6 Charles Crouch 2012-03-14 13:26:49 EDT
Can you confirm that they are actually running and passing on hudson.
Comment 9 Charles Crouch 2012-03-14 18:43:30 EDT
Actually dropping this back to medium, its a good thing to have for rhq4.4 but not a total blocker.
Comment 11 Charles Crouch 2012-08-02 15:59:29 EDT
Assigning to Heiko, who is leading the jdk7 support effort.
Comment 20 Heiko W. Rupp 2012-12-12 11:21:37 EST
Marking as verified, as the build works

Note You need to log in before you can comment on or make changes to this bug.