Arquillian Windows 和 Glassfish 4.1 非常慢

Arquillian with Windows and Glassfish 4.1 very slow

我使用 JSF 2.2.12、Prime Faces 6 和 Omnifaces 创建了一个 java 网络应用程序。在后端,我有像 Spring、Hibernate 这样的标准层,我的应用程序服务器是 Glassfish 4.1.1 我正在使用 Arquillian 进行一些测试。奇怪的是 Linux(Ubuntu 16) 有效,但 Windows 无效。

这是我的 Arquillian.xml 文件

<?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>

这里是一个测试示例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);
    }
}

BaseArquillianTest class 只有部署的静态方法

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

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

我的开发机器有双启动。 在 Linux 上,我的测试需要 60 秒。 在 Windows 上需要 20 分钟,有时我会看到 "Bad Request".

之类的错误

我尝试了 2 种不同的浏览器(phantomjs 和 chrome),但情况是一样的

我试过在互联网上搜索,但似乎有人遇到过这个错误。我想我在配置上犯了一些错误。

你能帮帮我吗?

问题是 Glassfish 中的错误。

我已经切换到 Payara,现在它很好,即使为了完成 4 个测试(和 2 个部署)需要 2 分钟。

我不知道那个时间是否可以接受?