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
ISPN-11345 Introduce integration tests for serverNG #7912
Conversation
dde8ba9
to
ba94d13
Compare
Please wait while I work on extracting the Infinispan Server Test Driver to its own module |
ea7c89c
to
5716229
Compare
server/runtime/src/test/java/org/infinispan/server/test/InfinispanServerDriver.java
Outdated
Show resolved
Hide resolved
5716229
to
47f6b7c
Compare
server/integration/src/test/java/org/infinispan/server/integration/HotRodRemoteCacheIT.java
Show resolved
Hide resolved
server/integration/src/test/resources/ispn-config/infinispan.xml
Outdated
Show resolved
Hide resolved
|
||
ArquillianServer server = ArquillianServer.valueOf(System.getProperty("infinispan.server.integration.launch").toUpperCase()); | ||
WebArchive war = ShrinkWrap.create(WebArchive.class, "infinispan-server-integration.war"); | ||
if (ArquillianServer.TOMCAT9.equals(server)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a NIT, instead of use if/else if/else in this case you can use swtich
switch (server) {
case TOMCAT9:
tomcat9(war);
break;
case WILDFLY18:
wildfly18(war);
break;
default:
throw new IllegalStateException(String.format("%s not supported", server));
}
47f6b7c
to
8b2c097
Compare
8b2c097
to
29d9f59
Compare
We now support be able to run the tests with and without Arquillian
|
22d5819
to
51857d3
Compare
4db8e38
to
a9e360b
Compare
8622845
to
3002046
Compare
4211c45
to
600ff91
Compare
0e05667
to
62ac5ce
Compare
62ac5ce
to
701dbf0
Compare
It is ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should work against master instead of 10.1.x.
Also I tried to build it but it fails with the following errors:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project infinispan-server-integration: Compilation failure: Compilation failure:
[ERROR] /home/tst/Work/Infinispan/infinispan/server/integration/src/main/java/org/infinispan/server/integration/enricher/Enricher.java:[35,41] cannot find symbol
[ERROR] symbol: variable REMOTE_CONTAINER
[ERROR] location: class org.infinispan.server.test.core.ServerRunMode
[ERROR] /home/tst/Work/Infinispan/infinispan/server/integration/src/main/java/org/infinispan/server/integration/enricher/Enricher.java:[38,26] cannot find symbol
[ERROR] symbol: method before(java.lang.String)
[ERROR] location: variable serverRule of type org.infinispan.server.integration.enricher.Enricher.RemoteInfinispanServerRule
[ERROR] /home/tst/Work/Infinispan/infinispan/server/integration/src/main/java/org/infinispan/server/integration/enricher/Enricher.java:[41,46] method before in class org.infinispan.server.test.junit4.InfinispanServerTestMethodRule cannot be applied to given types;
[ERROR] required: no arguments
[ERROR] found: java.lang.String,java.lang.String
[ERROR] reason: actual and formal argument lists differ in length
[ERROR] /home/tst/Work/Infinispan/infinispan/server/integration/src/main/java/org/infinispan/server/integration/enricher/Enricher.java:[55,46] cannot find symbol
[ERROR] symbol: method getInfinispanServerRule()
[ERROR] location: variable infinispanServerTestMethodRule of type org.infinispan.server.test.junit4.InfinispanServerTestMethodRule
[ERROR] /home/tst/Work/Infinispan/infinispan/server/integration/src/main/java/org/infinispan/server/integration/enricher/Enricher.java:[56,46] after() has private access in org.infinispan.server.test.junit4.InfinispanServerTestMethodRule
[ERROR] /home/tst/Work/Infinispan/infinispan/server/integration/src/main/java/org/infinispan/server/integration/enricher/Enricher.java:[68,7] method does not override or implement a method from a supertype
[ERROR] /home/tst/Work/Infinispan/infinispan/server/integration/src/main/java/org/infinispan/server/integration/enricher/Enricher.java:[70,14] serverDriver has private access in org.infinispan.server.test.junit4.InfinispanServerRule
[ERROR] /home/tst/Work/Infinispan/infinispan/server/integration/src/main/java/org/infinispan/server/integration/enricher/Enricher.java:[70,30] configuration has private access in org.infinispan.server.test.junit4.InfinispanServerRule
[ERROR] /home/tst/Work/Infinispan/infinispan/server/integration/src/main/java/org/infinispan/server/integration/enricher/Enricher.java:[70,43] cannot find symbol
[ERROR] symbol: method newDriver()
[ERROR] location: variable configuration of type org.infinispan.server.test.core.InfinispanServerTestConfiguration
[ERROR] /home/tst/Work/Infinispan/infinispan/server/integration/src/main/java/org/infinispan/server/integration/InfinispanServerIntegrationProcessorExecuter.java:[55,28] before(java.lang.String) has private access in org.infinispan.server.test.junit4.InfinispanServerRule
[ERROR] /home/tst/Work/Infinispan/infinispan/server/integration/src/main/java/org/infinispan/server/integration/InfinispanServerIntegrationProcessorExecuter.java:[65,19] after(java.lang.String) has private access in org.infinispan.server.test.junit4.InfinispanServerRule
[ERROR] -> [Help 1]
|
||
public enum ArquillianServerType { | ||
|
||
NONE, TOMCAT9, WILDFLY18; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove the version from the identifiers.
|
||
<properties> | ||
<version.tomcat>9.0.11</version.tomcat> | ||
<version.wildfly>18.0.1.Final</version.wildfly> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
19 please
WebArchive war = ShrinkWrap.create(WebArchive.class, "infinispan-server-integration.war"); | ||
addDefaultTestLib(war); | ||
ArquillianServerType arquillianServerType = ArquillianServerType.current(); | ||
if (ArquillianServerType.TOMCAT9.equals(arquillianServerType)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer a switch/case
/* | ||
* It starts the ServerRunMode.CONTAINER in the client side | ||
*/ | ||
public class InfinispanServerIntegrationProcessorExecuter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Executer/Executor/
I am waiting for #8173 get merged and then will work in the master branch |
I am waiting for #8297 get merged and then will work in the master branch |
Please rebase on master. You can also edit the PR and change the base to master, no need to open a new one. |
I am going to follow https://github.com/infinispan/infinispan/tree/master/integrationtests/wildfly-modules that will simplify a lot the code |
https://issues.redhat.com/browse/ISPN-11345
CONTAINER
driverSupport Arquillian
Allow running the test in Wildfly or Tomcat
Arquillian is optional
We can run the test without deploying it in Wildfly or Tomcat. It runs faster.
Support multiple Infinispan Servers
As a QE, I would like to create a test scenario using multiple Infinispan Servers.
Support Infinispan
CONTAINER
driverInfinispan Servers will be running in a container.