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

Create complementary unit tests for integrations tests #1767

Open
andchiind opened this issue Oct 16, 2024 · 2 comments
Open

Create complementary unit tests for integrations tests #1767

andchiind opened this issue Oct 16, 2024 · 2 comments
Labels
backend Backend related functionality improvement Improvement to existing functionality stale This issue or pull request already exists

Comments

@andchiind
Copy link
Contributor

Describe the improvement you would like to see
Currently we are highly dependent on larger integration tests where there are several threads interacting with each other. These are good for testing that the system as a whole is healthy, but they are not useful for identifying what the causes for issues are. I would therefore like us to have complementary tests for each integration test (the tests that include more than one thread, or which in general includes Thread.sleep), where we instead of having more than one thread we instead specify the specific state that one thread should create, and then simply start the main thread in the given state. So instead of running one thread to create the conditions we wish to test in the second thread, we simply set those conditions manually and then start the thread we wish to test. Ideally we would like to start the specific function in the second thread we wish to test, but this is a good start. By controlling the state more precisely we are also more precise in understanding issues in the code.

How will this change existing functionality?
We will be able to not only identify that there is an issue, but also what the issue is. Currently a lot of effort is used in debugging tests, which indicates that we are lacking in tests. A unit test should be simple enough that finding a cause should be more or less trivial.

How will this improvement affect the current Threat Model?
It will improve maintainability of the code, reducing vulnerabilities.

@andchiind andchiind added backend Backend related functionality improvement Improvement to existing functionality labels Oct 16, 2024
@Christdej
Copy link
Contributor

Skipping test:
QueuedContinuesWhenOnIsarStatusHappensAtTheSameTimeAsOnIsarMissionCompleted
Until this is solved

@aeshub
Copy link
Contributor

aeshub commented Dec 16, 2024

This issue has automatically been marked as stale as there has been no activity for 60 days.

@aeshub aeshub added the stale This issue or pull request already exists label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend related functionality improvement Improvement to existing functionality stale This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants