[jboss-jira] [JBoss JIRA] (WFLY-12054) Intermittent failures in WebsocketApplicationScopedTestCase
Marek Marusic (Jira)
issues at jboss.org
Fri May 10 05:25:00 EDT 2019
[ https://issues.jboss.org/browse/WFLY-12054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13731850#comment-13731850 ]
Marek Marusic commented on WFLY-12054:
--------------------------------------
[~brian.stansberry] Thank you so much for reporting this. I've created a PR with fix for this https://github.com/wildfly/wildfly/pull/12269. Could you please take a look at it whether it fits the recommendations you mentioned in this issue?
> Intermittent failures in WebsocketApplicationScopedTestCase
> -----------------------------------------------------------
>
> Key: WFLY-12054
> URL: https://issues.jboss.org/browse/WFLY-12054
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld, Test Suite
> Reporter: Brian Stansberry
> Assignee: Marek Marusic
> Priority: Major
>
> https://ci.wildfly.org/project.html?projectId=WF_PullRequest&buildTypeId=&tab=testDetails&testNameId=-8608833796003106928&order=TEST_STATUS_DESC&branch_WF_PullRequest=__all_branches__&itemsCount=50
> Problem is this:
> {code}
> try (Session session = ContainerProvider.getWebSocketContainer().connectToServer(Client.class, uriUser1)) {
> //Wait until the client is initialized e.q. the OnOpen is executed
> Thread.sleep(10);
> Assert.assertTrue(queues.size() > 0);
> {code}
> That kind of pattern of a short sleep followed by an assert is not reliable.
> This should loop checking periodically and only fail after an appropriate amount of time has passed. Unless that amount of time is relevant to what's being tested it should be a long time, 20 secs min, with TimeoutUtil.adjust used.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list