WildFly/Undertow:Undertow WebSocket 在 WildFly Arquillian 测试中不起作用

问题描述

目前,我正在尝试将 eclipse-ee4j/cargotracker(最初它是 Eric 的 DDD 书籍样本的重写版本)更新到最新的 Jakarta EE 8:

https://github.com/hantsy/cargotracker/tree/jakartaee8

我试图test WebSocket endpoint(/tracking)对抗最新的 WildFly 22.0.0.Final、WildFly Arquillian 3.0.1.Final 和 Arquillian Core 1.6.0。

喜欢用 jaxrs 客户端测试 Jaxrs,并尝试添加 Undertow websocket jsr 作为 deps 使用内置的 WebSocket 客户端 API 来测试 websocket 端点。

<dependency>
    <groupId>io.undertow</groupId>
    <artifactId>undertow-websockets-jsr</artifactId>
    <version>2.2.3.Final</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.jboss.threads</groupId>
    <artifactId>jboss-threads</artifactId>
    <version>2.4.0.Final</version>
    <scope>test</scope>
</dependency>

以上 deps 的版本与 WildFly 22.0.0.Final 中的相同。

运行测试时 undertow-WebSockets-jsr 需要 JBoss 线程,由于 arquiillain 生命周期错误而失败,aruqillain 根本没有开始部署工作。

我的问题是,如果使用 WildFly 工具,WebSocket 测试需要正确哪些依赖项。

作为一种解决方法,目前我改用 Glassfish tyrus 客户端来使我的测试通过

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)