Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flakey test: attach_when_channel_in_detaching_state #944

Open
AndyTWF opened this issue May 17, 2023 · 1 comment
Open

flakey test: attach_when_channel_in_detaching_state #944

AndyTWF opened this issue May 17, 2023 · 1 comment
Labels
failing-test Where an automated test is failing either locally or in CI. Perhaps flakey, wrong or bug. testing Includes all kinds of automated tests, the way that we run them and the infrastructure around them.

Comments

@AndyTWF
Copy link
Contributor

AndyTWF commented May 17, 2023

io.ably.lib.test.realtime.RealtimeSuite > io.ably.lib.test.realtime.RealtimeChannelTest.attach_when_channel_in_detaching_state[text_protocol] FAILED
    java.lang.AssertionError: 
    Expected: is <detached>
         but: was <attaching>
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
        at org.junit.Assert.assertThat(Assert.java:956)
        at org.junit.Assert.assertThat(Assert.java:923)
        at io.ably.lib.test.realtime.RealtimeChannelTest.attach_when_channel_in_detaching_state(RealtimeChannelTest.java:1070)

┆Issue is synchronized with this Jira Task by Unito

@AndyTWF AndyTWF added testing Includes all kinds of automated tests, the way that we run them and the infrastructure around them. failing-test Where an automated test is failing either locally or in CI. Perhaps flakey, wrong or bug. labels May 17, 2023
@sync-by-unito
Copy link

sync-by-unito bot commented May 17, 2023

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3585

AndyTWF added a commit that referenced this issue May 24, 2023
The test was failing/flakey because the channel sometimes quickly cycled
through detaching into attaching, before the listener had a chance to check
the state.

This change fixes the issue by making the assertion via a channel state listener
instead of a point-in-time check of the channel state, which means transient states
are also recorded.

Fixes #944
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failing-test Where an automated test is failing either locally or in CI. Perhaps flakey, wrong or bug. testing Includes all kinds of automated tests, the way that we run them and the infrastructure around them.
Development

Successfully merging a pull request may close this issue.

1 participant