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

Fix flakey SDK test cases #101

Merged
merged 9 commits into from
Mar 18, 2024
Merged

Fix flakey SDK test cases #101

merged 9 commits into from
Mar 18, 2024

Conversation

wba2hi
Copy link
Contributor

@wba2hi wba2hi commented Mar 15, 2024

Closes: #85
Closes: #97

The DockerDatabrokerContainer was introduced which uses java-docker to spawn / shutdown instances of the Databroker. Two different implementations are avilable SecureDockerDatabrokerContainer (auth enabled, tls enabled) and InsecureDockerDatabrokerContainer (auth disabled, tls disabled). I removed the "Authentication"-flavor which was basically "auth enabled, no tls".
A separate instance of the Databroker is now used for testDebugUnitTest and testReleaseUnitTest. This should reduce the clashes when running the same test at the same time.

I also rewrote most of the tests to use the Friendly*Listener and tried to generalize the tests more so that we no longer wait until x results are available (before: subscribe -> wait until one result is available -> check assumptions; now: subscribe -> check more generic assumptions which identify our operation succeded)

Since the different Databroker Instances are spawned by Android it is no longer required to start a Databroker instance before hand, so that the tests are running fine. It is also no longer required to start different flavor of Databrokers (e.g. tls enabled, auth enabled, insecure mode,...).

What still won't work reliably is when multiple terminals execute tests at the same time because one testset might spawn a SecureDatabroker while the other one tests on a InsecureDatabroker.

@wba2hi wba2hi requested a review from Chrylo March 15, 2024 14:29
Copy link
Contributor

@Chrylo Chrylo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works pretty well

@wba2hi wba2hi requested a review from Chrylo March 18, 2024 13:43
Copy link
Contributor

@Chrylo Chrylo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Chrylo Chrylo merged commit fbc54b7 into eclipse-kuksa:main Mar 18, 2024
5 checks passed
@Chrylo Chrylo deleted the fix-85 branch March 18, 2024 14:48
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

Successfully merging this pull request may close these issues.

Make "run-tests" able to execute Secure and Authentication Integration Tests Fix flakey SDK test cases
2 participants