Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add open liberty under thirdparty container tests #367

Closed
chandrams opened this issue Apr 3, 2018 · 7 comments
Closed

Add open liberty under thirdparty container tests #367

chandrams opened this issue Apr 3, 2018 · 7 comments
Assignees
Labels
enhancement type:external 3rd party application tests (invoked by the make target 'external')

Comments

@chandrams
Copy link
Contributor

Evaluate and include open liberty tests under third party container tests
https://github.com/OpenLiberty/open-liberty

#172

@chandrams chandrams added enhancement type:external 3rd party application tests (invoked by the make target 'external') labels Apr 3, 2018
@chandrams chandrams self-assigned this Apr 3, 2018
@chandrams
Copy link
Contributor Author

Followed the below steps in this link - https://github.com/OpenLiberty/open-liberty

export JAVA_HOME=/home/chandrams/java_builds/jdk8u162-b12_openj9-0.8.0
git clone [email protected]:OpenLiberty/open-liberty.git
cd open-liberty/dev
./gradlew cnf:initialize assemble :com.ibm.websphere.appserver.features:releaseNeeded

Executed the below command to run the unit tests:
./gradlew test

> Task :wlp.lib.extract_test:compileTestJava
Note: /home/chandrams/AdoptOpenJDK/git/open-liberty/dev/wlp.lib.extract_test/test/wlp/lib/extract/MapBasedSelfExtractorTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.


BUILD SUCCESSFUL in 6m 58s
1458 actionable tasks: 759 executed, 699 up-to-date

To run one of the FAT test - build.example_fat, executed the below command:
./gradlew build.example_fat:buildandrun

    [junit] Running com.ibm.ws.example.FATSuite
     [junit] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.439 sec
     [echo] Finished running com.ibm.ws.example.FATSuite
     [echo] XML report is available at /home/chandrams/AdoptOpenJDK/git/open-liberty/dev/build.example_fat/build/libs/autoFVT/results/junit

generateReports:
 [startAnt] Buildfile: /home/chandrams/AdoptOpenJDK/git/open-liberty/dev/build.example_fat/build/libs/autoFVT/src/ant/launch.xml
 [startAnt]
 [startAnt] BUILD FAILED
 [startAnt] /home/chandrams/AdoptOpenJDK/git/open-liberty/dev/build.example_fat/build/libs/autoFVT/src/ant/launch.xml:11: Unexpected element "{}HTML" {antlib:org.apache.tools.ant}HTML
 [startAnt]
 [startAnt] Total time: 0 seconds

BUILD FAILED
/home/chandrams/AdoptOpenJDK/git/open-liberty/dev/build.example_fat/build/libs/autoFVT/src/ant/launch.xml:511: Java returned: 1

Total time: 12 seconds


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':build.example_fat:runfat'.
> Process 'command 'ant'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 22s
63 actionable tasks: 33 executed, 30 up-to-date

@chandrams
Copy link
Contributor Author

Installed ant version 1.10.3 and the ran the below FAT test, it worked fine now. Need to figure out how to run all FAT tests

./gradlew build.example_fat:buildandrun

generateReports:
[startAnt] Buildfile: /home/chandrams/AdoptOpenJDK/git/open-liberty/dev/build.example_fat/build/libs/autoFVT/src/ant/launch.xml
[startAnt]
[startAnt] reallyGenerateReports:
[startAnt] [echo] Generating an HTML report based on the existing XML report
[startAnt] [mkdir] Created dir: /home/chandrams/AdoptOpenJDK/git/open-liberty/dev/build.example_fat/build/libs/autoFVT/results/junit.html
[startAnt] [junitreport] Processing /home/chandrams/AdoptOpenJDK/git/open-liberty/dev/build.example_fat/build/libs/autoFVT/results/junit/TESTS-TestSuites.xml to /tmp/null128732985
[startAnt] [junitreport] Loading stylesheet jar:file:/home/chandrams/apache-ant-1.10.3/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[startAnt] [junitreport] Transform time: 574ms
[startAnt] [junitreport] Deleting: /tmp/null128732985
[startAnt] [echo] HTML report is available at /home/chandrams/AdoptOpenJDK/git/open-liberty/dev/build.example_fat/build/libs/autoFVT/results/junit.html/index.html
[startAnt]
[startAnt] BUILD SUCCESSFUL
[startAnt] Total time: 1 second

archiveReports:

execute:

BUILD SUCCESSFUL
Total time: 13 seconds

BUILD SUCCESSFUL in 24s
63 actionable tasks: 33 executed, 30 up-to-date

@chandrams
Copy link
Contributor Author

Got a list of FAT testsuites using ls command, there were 75 tests out of which 42 tests passed and rest failed. The tests take a long time to run around 20 hrs or so.

Checked with Andrew Guibert from the WAS team, he suggested that we could just run only the unit tests as the WAS org has extensive infra to run all 90k+ FAT tests for OpenLiberty and WAS Liberty on hundreds of combinations of OSes and JDKs on a weekly basis, and they would report issues on Openj9 if any.

@chandrams
Copy link
Contributor Author

Found few intermittent issues while initializing and building the liberty test material. Fetching some of the artifacts fail:

./gradlew cnf:initialize

error  : dev :Exception: java.io.IOException: Could not fetch com.ibm.ws.org.eclipse.equinox:coordinator:1.3.200.v20160325-1323       
at aQute.maven.provider.MavenRepository.getFile(MavenRepository.java:173)    
at aQute.maven.provider.MavenRepository.lambda$get$0(MavenRepository.java:130)
at aQute.maven.provider.MavenRepository$$Lambda$60.000000006D079580.call(Unknown Source)
at org.osgi.util.promise.DeferredPromiseImpl$Submit.run(DeferredPromiseImpl.java:658)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:812)error  : dev :Failed to sync com.ibm.ws.org.eclipse.equinox:coordinator:1.3.200.v20160325-1323

./gradlew assemble :com.ibm.websphere.appserver.features:releaseNeeded
Fails with the above issue and the artifacts it tries to sync aren't same, I see the same issue with the below as well:

error  : dev :Failed to sync net.sf.jtidy:jtidy:9.3.8
error  : dev :Failed to sync com.ibm.ws.org.eclipse.equinox:region:1.3.2.v20170118-1930

@chandrams
Copy link
Contributor Author

When the initialization and build is successful, unit tests failed with the below issue:
./gradlew test

com.ibm.ws.logging.internal.hpel.HpelLogProviderImplTest > testWritingMessages FAILED
    org.junit.ComparisonFailure at HpelLogProviderImplTest.java:112

com.ibm.ws.logging.internal.hpel.HpelBaseTraceServiceTest > testWritingMessages FAILED
    org.junit.ComparisonFailure at HpelBaseTraceServiceTest.java:143

19 tests completed, 2 failed, 1 skipped
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':com.ibm.ws.logging.hpel:test'.
> There were failing tests. See the report at: file:///home/muchandr/git/open-liberty/dev/com.ibm.ws.logging.hpel/build/libs/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 6m 33s
1037 actionable tasks: 211 executed, 826 up-to-date

Exception details from the logs:

<a name="testWritingMessages"></a>
<h3 class="failures">testWritingMessages</h3>
<span class="code">
<pre>org.junit.ComparisonFailure: Record has incorrect formatted message expected:&lt;[debug message]&gt; but was:&lt;[TRAS3004E: Failed to write messages to the <user home>/git/open-liberty/dev/com.ibm.ws.logging.hpel/../com.ibm.ws.logging.hpel/build/unittest-logs/messages.log file.]&gt;
        at org.junit.Assert.assertEquals(Assert.java:125)
        at com.ibm.ws.logging.internal.hpel.HpelBaseTraceServiceTest.testWritingMessages(HpelBaseTraceServiceTest.java:143)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:508)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
        at test.common.SharedOutputManager$1.evaluate(SharedOutputManager.java:614)
        at org.junit.rules.RunRules.evaluate(RunRules.java:18)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)

Will submit multiple runs to check if they are intermittent or machine specific.

@chandrams
Copy link
Contributor Author

@sophia-guo
Copy link
Contributor

Close it in favor of #552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement type:external 3rd party application tests (invoked by the make target 'external')
Projects
None yet
Development

No branches or pull requests

2 participants