Skip to content

Conversation

@llucax
Copy link
Contributor

@llucax llucax commented Sep 26, 2023

This is a hack to avoid the inherent flakiness of the approach of using a real GRPC (mock) server. The server seems to stay alive for a short time after the test is finished, which causes the next test to fail because the port is already in use.

This also improves the test a bit by using an async context manager create the client and server, and stop the server automatically when the test is finished.

Related to #662.

This makes the tests a bit more concise and readable.

Signed-off-by: Leandro Lucarella <[email protected]>
This helps reducing the boilerplate even further and also makes sure
that the server and client ports are the same.

Signed-off-by: Leandro Lucarella <[email protected]>
This is a hack to avoid the inherent flakiness of the approach of using
a real GRPC (mock) server. The server seems to stay alive for a short
time after the test is finished, which causes the next test to fail
because the port is already in use.

This is a workaround until we have can get rid of the real GRPC server.

Signed-off-by: Leandro Lucarella <[email protected]>
@llucax llucax requested a review from a team as a code owner September 26, 2023 10:35
@github-actions github-actions bot added the part:tests Affects the unit, integration and performance (benchmarks) tests label Sep 26, 2023
@llucax llucax added the type:tech-debt Improves the project without visible changes for users label Sep 26, 2023
@llucax llucax self-assigned this Sep 26, 2023
@llucax llucax requested a review from Marenz September 26, 2023 10:39
@llucax llucax added this to the v1.0.0-rc2 milestone Sep 26, 2023
@llucax
Copy link
Contributor Author

llucax commented Sep 26, 2023

As I said in the issue, I don't think this really fixes the flakiness reported in #662, but it should still be an improvement in terms of readability and could potentially avoid flakiness on the finalization, so I would merge it anyways.

@llucax llucax enabled auto-merge September 26, 2023 10:41
@llucax
Copy link
Contributor Author

llucax commented Sep 26, 2023

Enabling auto-merge.

@llucax llucax added this pull request to the merge queue Sep 26, 2023
Merged via the queue into frequenz-floss:v0.x.x with commit 202c504 Sep 26, 2023
@llucax llucax deleted the increment-test-ports branch September 26, 2023 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:tests Affects the unit, integration and performance (benchmarks) tests type:tech-debt Improves the project without visible changes for users

Projects

Development

Successfully merging this pull request may close these issues.

2 participants