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

docker-compose file works for build but not for cube test #1120

Open
nicolasduminil opened this issue May 7, 2019 · 0 comments
Open

docker-compose file works for build but not for cube test #1120

nicolasduminil opened this issue May 7, 2019 · 0 comments

Comments

@nicolasduminil
Copy link

Issue Overview

docker-compose.yml works correctly for build but not for cube testing

Expected Behaviour

Attached docker-compose.yml valid

Current Behaviour

Exception below is raised

Steps To Reproduce
  1. mvn -DskipTests clean package. This starts two docker images, one running a Wildfly 10 application server with a WAR file deployed, the other one running a MySQL 5.7 databse server.
  2. mvn test. Raises the exception below.
Additional Information
<details>
fr.simplex_software.travel_agency.tests.integration.api.resources.ProfitDataTest  Time elapsed: 0.378 sec  <<< ERROR!
java.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor
	at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:165)
	at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:102)
	at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)
	at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:113)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:161)
	... 15 more
Caused by: java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.util.Collection
	at org.arquillian.cube.docker.impl.util.YamlUtil.asListOfString(YamlUtil.java:23)
	at org.arquillian.cube.docker.impl.docker.compose.ContainerBuilder.build(ContainerBuilder.java:194)
	at org.arquillian.cube.docker.impl.docker.compose.ComposeBuilder.build(ComposeBuilder.java:52)
	at org.arquillian.cube.docker.impl.docker.compose.DockerComposeConverter.convertCompose(DockerComposeConverter.java:86)
	at org.arquillian.cube.docker.impl.docker.compose.DockerComposeConverter.convert(DockerComposeConverter.java:70)
	at org.arquillian.cube.docker.impl.client.DockerContainerDefinitionParser.convert(DockerContainerDefinitionParser.java:84)
	at org.arquillian.cube.docker.impl.client.DockerContainerDefinitionParser.convert(DockerContainerDefinitionParser.java:76)
	at org.arquillian.cube.docker.impl.client.DockerContainerDefinitionParser.convert(DockerContainerDefinitionParser.java:48)
	at org.arquillian.cube.docker.impl.client.CubeDockerConfiguration.fromMap(CubeDockerConfiguration.java:162)
	at org.arquillian.cube.docker.impl.client.CubeDockerConfigurator.configure(CubeDockerConfigurator.java:81)
	at org.arquillian.cube.docker.impl.client.CubeDockerConfigurator.configure(CubeDockerConfigurator.java:63)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
	at org.jboss.arquillian.core.impl.ManagerImpl.bindAndFire(ManagerImpl.java:265)
	at org.jboss.arquillian.core.impl.InstanceImpl.set(InstanceImpl.java:74)
	at org.arquillian.cube.impl.client.CubeConfigurator.configure(CubeConfigurator.java:23)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
	at org.jboss.arquillian.core.impl.ManagerImpl.bindAndFire(ManagerImpl.java:265)
	at org.jboss.arquillian.core.impl.InstanceImpl.set(InstanceImpl.java:74)
	at org.jboss.arquillian.config.impl.extension.ConfigurationRegistrar.loadConfiguration(ConfigurationRegistrar.java:73)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
	at org.jboss.arquillian.core.impl.ManagerImpl.start(ManagerImpl.java:290)
	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.<init>(EventTestRunnerAdaptor.java:63)
	... 20 more
</details>

The exception started be be raised as soon as I added the MySQL service. Removing this service works as expected.
docker-compose.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant