glassfishjboss-arquillianarquillian-drone

Arquillian with Windows and Glassfish 4.1 very slow


I've created a java web app with JSF 2.2.12, Prime Faces 6 and Omnifaces. In the backend I've the standard layers like Spring, Hibernate and my application server is Glassfish 4.1.1 I'm implementing some tests with Arquillian. The strangeness is that on Linux(Ubuntu 16) works but with Windows doesn't.

Here my Arquillian.xml file

<?xml version="1.0"?>
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns="http://jboss.org/schema/arquillian"
            xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

    <container qualifier="glassfish" default="true">
        <configuration>
            <property name="remoteServerAddress">localhost</property>
            <property name="remoteServerHttpPort">8080</property>
            <property name="remoteServerAdminPort">4848</property>
        </configuration>
    </container>

    <extension qualifier="webdriver">
        <property name="browser">chrome</property>
        <property name="remoteReusable">true</property>
    </extension>
</arquillian>

And here one example of test class

public class IndexFrontendTest extends BaseArquillianTest {

    @Drone
    private WebDriver browser;

    @ArquillianResource
    private URL deploymentUrl;

    @Page
    private IndexPage indexPage;

    private FrontendTestComponent frontendTestComponent;

    @Before
    public void setUp() {
        browser.manage().window().setSize(new Dimension(1920, 1080));
        browser.get(deploymentUrl.toExternalForm());
        frontendTestComponent = new FrontendTestComponent();
    }

    @RunAsClient
    @Test
    public void testCarManufacturersAndModels() {
        indexPage.getCarManufacturersDropdown().selectByVisibleText("Ajax");
        frontendTestComponent.waitForJStoLoad(browser);
        frontendTestComponent.checkSelect(indexPage.getCarModelsDropdown(), 1, true);
    }

    @RunAsClient
    @Test
    public void testContinentsAndCountries() {
        indexPage.getContinentsDropdown().selectByValue("1");
        frontendTestComponent.waitForJStoLoad(browser);
        frontendTestComponent.checkSelect(indexPage.getCountriesDropdown(), 45, true);
    }
}

The BaseArquillianTest class has only the static method for the deploy

@RunWith(Arquillian.class)
public abstract class BaseArquillianTest {

    @Deployment(testable = true)
    public static WebArchive createDeployment() throws IOException {
       ...
       ...
    }
}

My Dev machine have the dual boot. On Linux my tests take 60 seconds. On Windows takes 20 minutes and sometimes I see and error like "Bad Request".

I've tried 2 different browsers (phantomjs and chrome) but the situation is the same

I've tried to search on internet but seems to be anyone have this error. I suppose I'm making some mistakes on configurations.

Please can you help me?


Solution

  • The problem is a bug inside Glassfish.

    I've switched to Payara and now it is fine, even if in order to complete 4 tests(and 2 deploys) it takes 2 minutes.

    I don't know if that is an acceptable time?