[JBoss JIRA] Created: (ARQ-245) When using TestNG, an embedded container (e.g. weld-ee) and multiple test classes, test fail randomly
by Adam Warski (JIRA)
When using TestNG, an embedded container (e.g. weld-ee) and multiple test classes, test fail randomly
-----------------------------------------------------------------------------------------------------
Key: ARQ-245
URL: https://jira.jboss.org/browse/ARQ-245
Project: Arquillian
Issue Type: Bug
Components: Test Harness Integration
Affects Versions: 1.0.0.Alpha3
Reporter: Adam Warski
As TestNG interleaves tests from different classes (even in single-threaded mode), cleanup of one class (@AfterClass) can happen to be invoked in the middle of executing tests from another class. More precisely, it clears the Container instance:
at org.jboss.weld.Container.cleanup(Container.java:108)
at org.jboss.weld.bootstrap.WeldBootstrap.shutdown(WeldBootstrap.java:460)
at org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.MockServletLifecycle.endApplication(MockServletLifecycle.java:126)
at org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.TestContainer.stopContainer(TestContainer.java:139)
at org.jboss.arquillian.container.weld.ee.embedded_1_1.WeldEEMockContainer.undeploy(WeldEEMockContainer.java:131)
at org.jboss.arquillian.impl.handler.ContainerUndeployer.callback(ContainerUndeployer.java:61)
at org.jboss.arquillian.impl.handler.ContainerUndeployer.callback(ContainerUndeployer.java:47)
at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
at org.jboss.arquillian.impl.EventTestRunnerAdaptor.afterClass(EventTestRunnerAdaptor.java:86)
at org.jboss.arquillian.testng.Arquillian.arquillianAfterClass(Arquillian.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:644)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:443)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:160)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:90)
at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:227)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:124)
at org.testng.TestRunner.runWorkers(TestRunner.java:908)
at org.testng.TestRunner.privateRun(TestRunner.java:617)
at org.testng.TestRunner.run(TestRunner.java:498)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:329)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:324)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:296)
at org.testng.SuiteRunner.run(SuiteRunner.java:201)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:915)
at org.testng.TestNG.runSuitesLocally(TestNG.java:879)
at org.testng.TestNG.run(TestNG.java:787)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:75)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:92)
(notice the AfterClass, Arquillian:83), which causes any subsequent test to throw:
org.jboss.arquillian.impl.event.FiredEventException: java.lang.IllegalStateException: Singleton is not set
at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68)
at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:113)
at org.jboss.arquillian.impl.EventTestRunnerAdaptor.before(EventTestRunnerAdaptor.java:97)
at org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(Arquillian.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:644)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:443)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:160)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:494)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:700)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1002)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:137)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:121)
at org.testng.TestRunner.runWorkers(TestRunner.java:908)
at org.testng.TestRunner.privateRun(TestRunner.java:617)
at org.testng.TestRunner.run(TestRunner.java:498)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:329)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:324)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:296)
at org.testng.SuiteRunner.run(SuiteRunner.java:201)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:915)
at org.testng.TestNG.runSuitesLocally(TestNG.java:879)
at org.testng.TestNG.run(TestNG.java:787)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:75)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:92)
Caused by: java.lang.IllegalStateException: Singleton is not set
at org.jboss.weld.bootstrap.api.helpers.IsolatedStaticSingletonProvider$IsolatedStaticSingleton.get(IsolatedStaticSingletonProvider.java:52)
at org.jboss.weld.Container.instance(Container.java:58)
at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.getProxiedInstance(ClientProxyMethodHandler.java:138)
at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:100)
at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)
at org.jboss.weld.servlet.HttpSessionManager_$$_javassist_14.setSession(HttpSessionManager_$$_javassist_14.java)
at org.jboss.arquillian.container.weld.ee.embedded_1_1.WeldEEMockContainer$1.callback(WeldEEMockContainer.java:111)
at org.jboss.arquillian.container.weld.ee.embedded_1_1.WeldEEMockContainer$1.callback(WeldEEMockContainer.java:95)
at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
... 28 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[JBoss JIRA] (ARQ-1047) RemoteAddress nor Remote property does not trigger remote webdriver
by Karel Piwko (JIRA)
Karel Piwko created ARQ-1047:
--------------------------------
Summary: RemoteAddress nor Remote property does not trigger remote webdriver
Key: ARQ-1047
URL: https://issues.jboss.org/browse/ARQ-1047
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Extension - Drone
Affects Versions: drone_1.1.0.CR2
Reporter: Karel Piwko
Assignee: Karel Piwko
Priority: Critical
Fix For: drone_1.2.0.next
When user tries to use Selenium Grid together with Drone, e.g.:
{code:java}
@Test
public void simpleWebdriverTest(@Drone WebDriver webdriver) {
webdriver.get(contextPath.toString());
webdriver.findElement(By.id("name")).sendKeys("Samuel");
webdriver.findElement(By.id("email")).sendKeys("samuel(a)vimes.dw");
webdriver.findElement(By.id("phoneNumber")).sendKeys("1234567890");
webdriver.findElement(By.id("register")).submit();
// FIXME with Graphene, you can wait for a request
Assert.assertTrue(true);
}
{code}
it is not possible to trigger RemoteWebDriver builder via:
-Darquillian.webdriver.remote.address=xyz nor
-Darquillian.webdriver.remote=true
User can use only RemoteReusable via
-Darquillian.webdriver.remote.reusable=true, which is not correct behavior and prevents easy switch between local browser and Selenium Grid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[JBoss JIRA] (ARQ-1050) Drone fails to instantiate drivers when operadriver isn't on classpath
by Lukáš Fryč (JIRA)
Lukáš Fryč created ARQ-1050:
-------------------------------
Summary: Drone fails to instantiate drivers when operadriver isn't on classpath
Key: ARQ-1050
URL: https://issues.jboss.org/browse/ARQ-1050
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Extension - Drone
Affects Versions: drone_1.1.0.CR2
Reporter: Lukáš Fryč
Assignee: Karel Piwko
Priority: Critical
When {{operadriver}} isn't included on classpath, Drone fails to instantiate {{HtmlUnitDriver}}.
Likely other browser drivers are affected as well.
{code}
java.lang.NoClassDefFoundError: com/opera/core/systems/OperaDriver
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
at java.lang.Class.getDeclaredMethods(Class.java:1808)
at org.jboss.arquillian.core.impl.Reflections.getObserverMethods(Reflections.java:52)
at org.jboss.arquillian.core.impl.ExtensionImpl.of(ExtensionImpl.java:51)
at org.jboss.arquillian.core.impl.ManagerImpl.inject(ManagerImpl.java:198)
at org.jboss.arquillian.core.impl.InjectorImpl.inject(InjectorImpl.java:58)
at org.jboss.arquillian.core.impl.loadable.ServiceRegistryLoader.createServiceInstance(ServiceRegistryLoader.java:108)
at org.jboss.arquillian.core.impl.loadable.ServiceRegistryLoader.all(ServiceRegistryLoader.java:55)
at org.jboss.arquillian.drone.impl.DroneRegistrar.registerConfigurators(DroneRegistrar.java:84)
at org.jboss.arquillian.drone.impl.DroneRegistrar.register(DroneRegistrar.java:77)
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:601)
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.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
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:601)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:68)
at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:97)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.ClassNotFoundException: com.opera.core.systems.OperaDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 35 more
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months