4 Star 0 Fork 10

src-openEuler/xnio

 / 详情

xnio build problem in openEuler:22.09

已完成
缺陷
创建于  
2022-08-11 11:57

评论 (2)

zhouxiaxiang 创建了缺陷

Hi zhouxiaxiang, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: sig-Java, and any of the maintainers: @雒海波 , @sinever , @chong_W , @rita_dong , @caodongxia , @xu_ping

openeuler-ci-bot 添加了
 
sig/sig-Java
标签

失败现象:

 [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.262 s - in org.xnio.nio.test.NioTcpChannelTestCase
[  127s] [INFO] Running org.xnio.nio.test.MultiThreadedNioTcpChannelTestCase
[  128s] [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.443 s - in org.xnio.nio.test.MultiThreadedNioTcpChannelTestCase
[  128s] [INFO] Running org.xnio.nio.test.XnioWorkerTestCase
[  259s] [ERROR] Tests run: 27, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 131.837 s <<< FAILURE! - in org.xnio.nio.test.XnioWorkerTestCase
[  259s] [ERROR] cancelAcceptTcpStream(org.xnio.nio.test.XnioWorkerTestCase)  Time elapsed: 0.017 s  <<< FAILURE!
[  259s] java.lang.AssertionError
[  259s] 	at org.junit.Assert.fail(Assert.java:86)
[  259s] 	at org.junit.Assert.assertTrue(Assert.java:41)
[  259s] 	at org.junit.Assert.assertNotNull(Assert.java:712)
[  259s] 	at org.junit.Assert.assertNotNull(Assert.java:722)
[  259s] 	at org.xnio.nio.test.XnioWorkerTestCase.cancelAcceptTcpStream(XnioWorkerTestCase.java:484)
[  259s] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[  259s] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[  259s] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[  259s] 	at java.lang.reflect.Method.invoke(Method.java:498)
[  259s] 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
[  259s] 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
[  259s] 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:52)
[  259s] 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
[  259s] 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
[  259s] 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
[  259s] 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
[  259s] 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
[  259s] 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
[  259s] 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
[  259s] 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
[  259s] 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
[  259s] 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
[  259s] 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
[  259s] 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
[  259s] 	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
[  259s] 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
[  259s] 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
[  259s] 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
[  259s] 	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
[  259s] 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
[  259s] 	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
[  259s] 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)
[  259s] 
[  259s] [INFO] Running org.xnio.nio.test.FileSystemWatcherTestCase
[  259s] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.03 s - in org.xnio.nio.test.FileSystemWatcherTestCase
[  259s] [INFO] Running org.xnio.nio.test.NioUdpTestCase
[  259s] [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 s - in org.xnio.nio.test.NioUdpTestCase
[  259s] [INFO] Running org.xnio.nio.test.NioHalfDuplexChannelPipeTestCase
[  260s] [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.12 s - in org.xnio.nio.test.NioHalfDuplexChannelPipeTestCase
[  263s] [INFO] 
[  263s] [INFO] Results:
[  263s] [INFO] 
[  263s] [ERROR] Failures: 
[  263s] [ERROR]   XnioWorkerTestCase.cancelAcceptTcpStream:484
[  263s] [INFO] 
[  263s] [ERROR] Tests run: 121, Failures: 1, Errors: 0, Skipped: 8
[  263s] [INFO] 
[  263s] [INFO] 
[  263s] [INFO] ------------------------------------------------------------------------
[  263s] [INFO] Skipping XNIO Parent POM
[  263s] [INFO] This project has been banned from the build due to previous failures.
[  263s] [INFO] ------------------------------------------------------------------------
[  263s] [INFO] ------------------------------------------------------------------------
[  263s] [INFO] Reactor Summary for XNIO Parent POM 3.4.0.Final:
[  263s] [INFO] 
[  263s] [INFO] XNIO Parent POM .................................... SUCCESS [  0.402 s]
[  263s] [INFO] XNIO API ........................................... SUCCESS [ 57.444 s]
[  263s] [INFO] XNIO NIO Implementation ............................ FAILURE [02:21 min]
[  263s] [INFO] ------------------------------------------------------------------------
[  263s] [INFO] BUILD FAILURE

该失败用例为:https://github.com/xnio/xnio/blob/3.4.0.Final/nio-impl/src/test/java/org/xnio/nio/test/XnioWorkerTestCase.java 第483行,如下:

464    @Test
465    public void cancelAcceptTcpStream() throws CancellationException, IOException {
466        final XnioWorker xnioWorker = xnio.createWorker(OptionMap.EMPTY);
467        final TestChannelListener<ConnectedStreamChannel> channelListener = new TestChannelListener<ConnectedStreamChannel>();
468        final TestChannelListener<BoundChannel> bindListener = new TestChannelListener<BoundChannel>();
469        final IoFuture<ConnectedStreamChannel> channelFuture = xnioWorker.acceptStream(bindAddress, channelListener, bindListener, OptionMap.EMPTY);
470        final IoFuture<ConnectedStreamChannel> connectedStreamChannel = xnioWorker.connectStream(bindAddress, null, OptionMap.EMPTY);
471
472        assertNotNull(connectedStreamChannel);
473        assertNotNull(channelFuture);
474
475        channelFuture.cancel();
476
477        CancellationException expected = null;
478        try {
479            channelFuture.get();
480        } catch (CancellationException e) {
481            expected = e;
482        }
483        assertNotNull(expected);
484
485        assertFalse(channelListener.isInvokedYet());
486        if (bindListener.isInvokedYet()) {
487            BoundChannel boundChannel = bindListener.getChannel();
488            assertNotNull(boundChannel);
489            assertFalse(boundChannel.isOpen());
490        }
491    }

失败的原因:channelFuture.cancel()执行失败,导致connectionFuture1.get()执行成功,从而expected为空,最终assertNotNull(expected)断言失败。

该测试用例根据环境的不同存在概率性失败,这种用例不保证100%成功,上游社区最新的解决办法是channelFuture.cancel()执行失败后重新执行一次,减少偶线失败的概率。
上游社区修改提交:https://github.com/xnio/xnio/commit/f4e4b053e29298be8df8941aefc93d82c0be2f1c
上游社区该提交在3.8.3版本合入,由于xnio上层依赖较多,升级影响较大,建议先跳过该用例。

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
5329419 openeuler ci bot 1632792936
1
https://gitee.com/src-openeuler/xnio.git
git@gitee.com:src-openeuler/xnio.git
src-openeuler
xnio
xnio

搜索帮助

A270a887 8829481 3d7a4017 8829481