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 tomcat tests #281

Closed
chandrams opened this issue Feb 27, 2018 · 6 comments
Closed

Add tomcat tests #281

chandrams opened this issue Feb 27, 2018 · 6 comments
Assignees
Labels
enhancement Reported/Fixed Upstream type:external 3rd party application tests (invoked by the make target 'external')

Comments

@chandrams
Copy link
Contributor

chandrams commented Feb 27, 2018

This issue is for evaluating and adding tomcat tests into the third party container tests.

#172

There are several tomcat versions, with varying major and minor versions, we will need to decide on what versions to test, there are frequent releases of 8.5.x, I have evaluated tomcat version 8.5.24

@chandrams chandrams self-assigned this Feb 27, 2018
@chandrams
Copy link
Contributor Author

chandrams commented Mar 2, 2018

Executed Tomcat 8.5.24 tests, on both Openjdk8 and Openjdk9 builds below are the observations:

With Openjdk8 (hotspot vm) - tests passed
With Openjdk8-openj9 - 2 tests failed

test:
   [concat] Testsuites with skipped tests:
   [concat] TEST-org.apache.catalina.connector.TestMaxConnections.NIO2.txt
   [concat] TEST-org.apache.catalina.connector.TestRequest.NIO.txt
   [concat] TEST-org.apache.catalina.connector.TestRequest.NIO2.txt
   [concat] TEST-org.apache.catalina.core.TestDefaultInstanceManager.NIO.txt
   [concat] TEST-org.apache.catalina.core.TestDefaultInstanceManager.NIO2.txt
   [concat] TEST-org.apache.catalina.loader.TestWebappClassLoaderThreadLocalMemoryLeak.NIO.txt
   [concat] TEST-org.apache.catalina.loader.TestWebappClassLoaderThreadLocalMemoryLeak.NIO2.txt
   [concat] TEST-org.apache.coyote.http11.upgrade.TestUpgradeInternalHandler.NIO.txt
   [concat] TEST-org.apache.el.parser.TestELParser.NIO.txt
   [concat] TEST-org.apache.el.parser.TestELParser.NIO2.txt
   [concat] TEST-org.apache.tomcat.util.net.TestSsl.NIO.txt
   [concat] TEST-org.apache.tomcat.util.net.openssl.TestOpenSSLConf.NIO.txt
   [concat] TEST-org.apache.tomcat.util.net.openssl.TestOpenSSLConf.NIO2.txt
   [concat] TEST-org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfigurationParser.NIO.txt
   [concat] TEST-org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfigurationParser.NIO2.txt
   [concat] TEST-org.apache.tomcat.websocket.TestConnectionLimit.NIO.txt
   [concat] TEST-org.apache.tomcat.websocket.TestConnectionLimit.NIO2.txt
   [concat] TEST-org.apache.tomcat.websocket.TestWsWebSocketContainerWithProxy.NIO.txt
   [concat] TEST-org.apache.tomcat.websocket.TestWsWebSocketContainerWithProxy.NIO2.txt
   [concat] TEST-org.apache.tomcat.websocket.pojo.TestEncodingDecoding.NIO.txt
   [concat] TEST-org.apache.tomcat.websocket.pojo.TestEncodingDecoding.NIO2.txt
   [concat] TEST-org.apache.tomcat.websocket.server.TestWsRemoteEndpointImplServer.NIO.txt
   [concat] TEST-org.apache.tomcat.websocket.server.TestWsRemoteEndpointImplServer.NIO2.txt
   [concat] Testsuites with failed tests:
   [concat] TEST-org.apache.catalina.startup.TestWebappServiceLoader.NIO.txt
   [concat] TEST-org.apache.catalina.startup.TestWebappServiceLoader.NIO2.txt

BUILD FAILED

Failed to instantiate mock calling constructor: Exception in constructor
java.lang.RuntimeException: Failed to instantiate mock calling constructor: Exception in constructor
        at org.easymock.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:217)
        at org.easymock.internal.MocksControl.createMock(MocksControl.java:114)
        at org.easymock.internal.MockBuilder.createMock(MockBuilder.java:214)
        at org.easymock.internal.MockBuilder.createMock(MockBuilder.java:184)
        at org.apache.catalina.startup.TestWebappServiceLoader.init(TestWebappServiceLoader.java:56)
Caused by: java.lang.SecurityException: Uninitialized class loader
        at java.lang.ClassLoader.<init>(ClassLoader.java:254)
        at $java.lang.ClassLoader$$EnhancerByCGLIB$$a778596e.<init>(<generated>)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.easymock.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:207)

With Openjdk9 - 2 tests failed

[junit] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.072 sec

test-apr-exists:

test-apr:

cobertura-report:

test:
   [concat] Testsuites with skipped tests:
   [concat] TEST-org.apache.catalina.connector.TestMaxConnections.NIO2.txt
   [concat] TEST-org.apache.catalina.connector.TestRequest.NIO.txt
   [concat] TEST-org.apache.catalina.connector.TestRequest.NIO2.txt
   [concat] TEST-org.apache.catalina.core.TestDefaultInstanceManager.NIO.txt
   [concat] TEST-org.apache.catalina.core.TestDefaultInstanceManager.NIO2.txt
   [concat] TEST-org.apache.catalina.loader.TestWebappClassLoaderThreadLocalMemoryLeak.NIO.txt
   [concat] TEST-org.apache.catalina.loader.TestWebappClassLoaderThreadLocalMemoryLeak.NIO2.txt
   [concat] TEST-org.apache.coyote.http11.upgrade.TestUpgradeInternalHandler.NIO.txt
   [concat] TEST-org.apache.el.parser.TestELParser.NIO.txt
   [concat] TEST-org.apache.el.parser.TestELParser.NIO2.txt
   [concat] TEST-org.apache.tomcat.util.net.TestSsl.NIO.txt
   [concat] TEST-org.apache.tomcat.util.net.openssl.TestOpenSSLConf.NIO.txt
   [concat] TEST-org.apache.tomcat.util.net.openssl.TestOpenSSLConf.NIO2.txt
   [concat] TEST-org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfigurationParser.NIO.txt
   [concat] TEST-org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfigurationParser.NIO2.txt
   [concat] TEST-org.apache.tomcat.websocket.TestConnectionLimit.NIO.txt
   [concat] TEST-org.apache.tomcat.websocket.TestConnectionLimit.NIO2.txt
   [concat] TEST-org.apache.tomcat.websocket.TestWsWebSocketContainerWithProxy.NIO.txt
   [concat] TEST-org.apache.tomcat.websocket.TestWsWebSocketContainerWithProxy.NIO2.txt
   [concat] TEST-org.apache.tomcat.websocket.pojo.TestEncodingDecoding.NIO.txt
   [concat] TEST-org.apache.tomcat.websocket.pojo.TestEncodingDecoding.NIO2.txt
   [concat] TEST-org.apache.tomcat.websocket.server.TestWsRemoteEndpointImplServer.NIO.txt
   [concat] TEST-org.apache.tomcat.websocket.server.TestWsRemoteEndpointImplServer.NIO2.txt
   [concat] Testsuites with failed tests:
   [concat] TEST-org.apache.tomcat.util.scan.TestStandardJarScanner.NIO.txt
   [concat] TEST-org.apache.tomcat.util.scan.TestStandardJarScanner.NIO2.txt



org.apache.tomcat.util.scan.TestStandardJarScanner.NIO.txt && org.apache.tomcat.util.scan.TestStandardJarScanner.NIO2.txt


Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.259 sec

Testcase: testWebappClassPath took 0.201 sec
        FAILED
Unexpected class loader type: jdk.internal.loader.ClassLoaders$AppClassLoader
junit.framework.AssertionFailedError: Unexpected class loader type: jdk.internal.loader.ClassLoaders$AppClassLoader
        at org.apache.tomcat.util.scan.TestStandardJarScanner.testWebappClassPath(TestStandardJarScanner.java:74)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Testcase: skipsInvalidClasspathURLNoFilePartNoFileScheme took 0.031 sec

With Openjdk9-openj9 - 4 tests failed

test:
   [concat] Testsuites with skipped tests:
   [concat] TEST-org.apache.catalina.connector.TestMaxConnections.NIO2.txt
   [concat] TEST-org.apache.catalina.connector.TestRequest.NIO.txt
   [concat] TEST-org.apache.catalina.connector.TestRequest.NIO2.txt
   [concat] TEST-org.apache.catalina.core.TestDefaultInstanceManager.NIO.txt
   [concat] TEST-org.apache.catalina.core.TestDefaultInstanceManager.NIO2.txt
   [concat] TEST-org.apache.catalina.loader.TestWebappClassLoaderThreadLocalMemoryLeak.NIO.txt
   [concat] TEST-org.apache.catalina.loader.TestWebappClassLoaderThreadLocalMemoryLeak.NIO2.txt
   [concat] TEST-org.apache.coyote.http11.upgrade.TestUpgradeInternalHandler.NIO.txt
   [concat] TEST-org.apache.el.parser.TestELParser.NIO.txt
   [concat] TEST-org.apache.el.parser.TestELParser.NIO2.txt
   [concat] TEST-org.apache.tomcat.util.net.TestSsl.NIO.txt
   [concat] TEST-org.apache.tomcat.util.net.openssl.TestOpenSSLConf.NIO.txt
   [concat] TEST-org.apache.tomcat.util.net.openssl.TestOpenSSLConf.NIO2.txt
   [concat] TEST-org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfigurationParser.NIO.txt
   [concat] TEST-org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfigurationParser.NIO2.txt
   [concat] TEST-org.apache.tomcat.websocket.TestConnectionLimit.NIO.txt
   [concat] TEST-org.apache.tomcat.websocket.TestConnectionLimit.NIO2.txt
   [concat] TEST-org.apache.tomcat.websocket.TestWsWebSocketContainerWithProxy.NIO.txt
   [concat] TEST-org.apache.tomcat.websocket.TestWsWebSocketContainerWithProxy.NIO2.txt
   [concat] TEST-org.apache.tomcat.websocket.pojo.TestEncodingDecoding.NIO.txt
   [concat] TEST-org.apache.tomcat.websocket.pojo.TestEncodingDecoding.NIO2.txt
   [concat] TEST-org.apache.tomcat.websocket.server.TestWsRemoteEndpointImplServer.NIO.txt
   [concat] TEST-org.apache.tomcat.websocket.server.TestWsRemoteEndpointImplServer.NIO2.txt
   [concat] Testsuites with failed tests:
   [concat] TEST-org.apache.catalina.startup.TestWebappServiceLoader.NIO.txt
   [concat] TEST-org.apache.catalina.startup.TestWebappServiceLoader.NIO2.txt
   [concat] TEST-org.apache.tomcat.util.scan.TestStandardJarScanner.NIO.txt
   [concat] TEST-org.apache.tomcat.util.scan.TestStandardJarScanner.NIO2.txt


_**  First 2 failures are the same as the failures observed with Openjdk8-openj9 build **_
java.lang.RuntimeException: Failed to instantiate mock calling constructor: Exception in constructor
        at org.easymock.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:217)
        at org.easymock.internal.MocksControl.createMock(MocksControl.java:114)
        at org.easymock.internal.MockBuilder.createMock(MockBuilder.java:214)
        at org.easymock.internal.MockBuilder.createMock(MockBuilder.java:184)
        at org.apache.catalina.startup.TestWebappServiceLoader.init(TestWebappServiceLoader.java:56)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
Caused by: java.lang.SecurityException: Uninitialized class loader
        at java.lang.ClassLoader.<init>(java.base@9-internal/ClassLoader.java:311)
        at java.lang.ClassLoader.<init>(java.base@9-internal/ClassLoader.java:272)
        at $java.lang.ClassLoader$$EnhancerByCGLIB$$845eba0c.<init>(<generated>)
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(java.base@9-internal/Native Method)
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(java.base@9-internal/NativeConstructorAccessorImpl.java:62)
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(java.base@9-internal/DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(java.base@9-internal/Constructor.java:488)
        at org.easymock.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:207)


**_Second two failures are same failures as seen with Openjdk9_**
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.184 sec

Testcase: testWebappClassPath took 0.091 sec
        FAILED
Unexpected class loader type: jdk.internal.loader.ClassLoaders$AppClassLoader
junit.framework.AssertionFailedError: Unexpected class loader type: jdk.internal.loader.ClassLoaders$AppClassLoader
        at org.apache.tomcat.util.scan.TestStandardJarScanner.testWebappClassPath(TestStandardJarScanner.java:74)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)

Testcase: skipsInvalidClasspathURLNoFilePartNoFileScheme took 0.075 sec

@chandrams
Copy link
Contributor Author

chandrams commented Mar 6, 2018

Raised an issue for the failure above - eclipse-openj9/openj9#1353

@chandrams
Copy link
Contributor Author

The below failure on Openjdk9 has been reported here - https://bz.apache.org/bugzilla/show_bug.cgi?id=62002 and as per this link the test has been ignored. I see tomcat 9 mentioned, will have to try with that version.

Unexpected class loader type: jdk.internal.loader.ClassLoaders$AppClassLoader
junit.framework.AssertionFailedError: Unexpected class loader type: jdk.internal.loader.ClassLoaders$AppClassLoader
at org.apache.tomcat.util.scan.TestStandardJarScanner.testWebappClassPath(TestStandardJarScanner.java:74)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)

@smlambert
Copy link
Contributor

Do you know if there is a way to exclude that test from the test run?

@chandrams
Copy link
Contributor Author

Sorry missed your question. Will check on this and update Shelley.

@smlambert
Copy link
Contributor

These tests are now running in nightly builds (https://ci.adoptopenjdk.net/view/External%20tests/job/openjdk8_j9_externaltest_x86-64_linux/lastSuccessfulBuild/artifact/openjdk-tests/TestConfig/test_output_15221677258771/TestTargetResult.tap/*view*/), so closing.

There is a failure appearing, which could be configuration or network issue, but I will open a new issue for that.

@smlambert smlambert added the type:external 3rd party application tests (invoked by the make target 'external') label Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Reported/Fixed Upstream type:external 3rd party application tests (invoked by the make target 'external')
Projects
None yet
Development

No branches or pull requests

3 participants