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

Tests: Flakyness with "active servers" logic within test suite #404

Closed
amotl opened this issue Mar 25, 2021 · 10 comments
Closed

Tests: Flakyness with "active servers" logic within test suite #404

amotl opened this issue Mar 25, 2021 · 10 comments

Comments

@amotl
Copy link
Member

amotl commented Mar 25, 2021

Hi,

on [1] and [2], I just observed a flakyness on a single job when running the tests on #397 and #402.

File "/home/runner/work/crate-python/crate-python/src/crate/client/doctests/http.txt", line 41, in http.txt
Failed example:
    http_client._active_servers
Expected:
    ['http://127.0.0.1:44209']
Got:
    ['http://invalid_host:9999', 'http://127.0.0.1:44209']

With kind regards,
Andreas.

[1] https://github.com/crate/crate-python/actions/runs/687059879
[2] https://github.com/crate/crate-python/runs/2195227267#step:5:199

@amotl
Copy link
Member Author

amotl commented Mar 25, 2021

Maybe this happens because the retry interval is set to a very low value when running the tests.

def setUp(self):
self.client = Client(self.servers)
self.client.retry_interval = 0.1 # faster retry

So, the invalid_host might have gotten swapped out and back in again too quickly.

I actually recognized that this specific job was executing very slow, so it probably has been scheduled on a CI machine currently experiencing more load than others.

@amotl amotl changed the title Flakyness with "active servers" logic Flakyness with "active servers" logic within test suite Mar 25, 2021
@amotl
Copy link
Member Author

amotl commented Mar 26, 2021

Observed this again when running the tests on behalf of #402. So, I added 89507a0 there.

@amotl amotl closed this as completed Mar 26, 2021
@amotl
Copy link
Member Author

amotl commented Apr 8, 2021

The same thing happened again at https://github.com/crate/crate-python/runs/2297326550#step:6:184.

File "/home/runner/work/crate-python/crate-python/src/crate/client/doctests/http.txt", line 41, in http.txt
Failed example:
    http_client._active_servers
Expected:
    ['http://127.0.0.1:44209']
Got:
    ['http://invalid_host:9999', 'http://127.0.0.1:44209']

@amotl amotl reopened this Apr 8, 2021
@amotl
Copy link
Member Author

amotl commented Apr 8, 2021

Now also, slightly different but the same issue, at https://github.com/crate/crate-python/runs/2297736340#step:6:166.

File "/home/runner/work/crate-python/crate-python/src/crate/client/doctests/http.txt", line 61, in http.txt
Failed example:
    http_client._get_server()
Expected:
    'http://invalid_host:9999'
Got:
    'http://even_more_invalid_host:9999'

@amotl amotl changed the title Flakyness with "active servers" logic within test suite Tests: Flakyness with "active servers" logic within test suite Apr 26, 2022
@amotl
Copy link
Member Author

amotl commented Apr 28, 2022

Same thing happens again 12:

File "/home/runner/work/crate-python/crate-python/src/crate/client/doctests/http.txt", line 41, in http.txt
Failed example:
    http_client._active_servers
Expected:
    ['http://127.0.0.1:44209/']
Got:
    ['http://invalid_host:9999', 'http://127.0.0.1:44209/']

Footnotes

  1. https://github.com/crate/crate-python/runs/6210356011#step:6:283

  2. https://github.com/crate/crate-python/runs/6300072011#step:5:287

@amotl
Copy link
Member Author

amotl commented Sep 29, 2022

I did not observe this flaw recently, so I am closing this issue.

@amotl amotl closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2022
@amotl
Copy link
Member Author

amotl commented Oct 6, 2022

It still happens when runners seem to be slow.

File "/home/runner/work/crate-python/crate-python/src/crate/client/doctests/http.txt", line 41, in http.txt
Failed example:
    http_client._active_servers
Expected:
    ['http://127.0.0.1:44209/']
Got:
    ['http://invalid_host:9999', 'http://127.0.0.1:44209/']

-- https://github.com/crate/crate-python/actions/runs/3198965176/jobs/5224159502#step:4:338

@amotl amotl reopened this Oct 6, 2022
amotl added a commit that referenced this issue Oct 6, 2022
This tries to improve timing behaviour/flakyness on CI.

References: #404, 575f6a3
amotl added a commit that referenced this issue Oct 10, 2022
This tries to improve timing behaviour/flakyness on CI.

References: #404, 575f6a3
amotl added a commit that referenced this issue Nov 22, 2022
This tries to improve timing behaviour/flakyness on CI.

References: #404, 575f6a3
@amotl
Copy link
Member Author

amotl commented Dec 16, 2022

This one still happens from time to time.

-- https://github.com/crate/crate-python/actions/runs/3700515171/jobs/6269005827#step:4:565

@amotl
Copy link
Member Author

amotl commented Jun 17, 2024

Still happening occasionally. One re-run usually fixes the fluke.

-- https://github.com/crate/crate-python/actions/runs/9545350897/job/26305926214#step:4:651

@amotl
Copy link
Member Author

amotl commented Oct 25, 2024

This issue has not been observed recently, so I am closing this.

@amotl amotl closed this as completed Oct 25, 2024
amotl added a commit that referenced this issue Oct 25, 2024
This tries to improve timing behaviour/flakyness on CI.

References: #404, 575f6a3
amotl added a commit that referenced this issue Nov 1, 2024
This tries to improve timing behaviour/flakyness on CI.

References: #404, 575f6a3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant