Skip to content

Fix concurrency issues in tests to make build stable. #113

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

Closed
wants to merge 31 commits into from

Conversation

terrypacker
Copy link

@terrypacker terrypacker commented Feb 12, 2025

Finding and fixing many timing related issues for testing.

Adding an abstraction for the Network and Transport layers to use in testing for better reproducibility.

  • Various fixes to cater for the executor thread pool running tasks in an arbitrary order.
  • Pulling in sero-warp and sero-scheduler source code so we don't have those dependencies
  • Update to build for Java 17
  • Change version to 7.0.0-SNAPSHOT

Kown tests that still need to be fixed due to sporadic failing:

  • BBMDTest - Will need to be modified to use SynchrousTestNetwork
  • WarpScheduledExecutorServiceTest
  • ScheduledExecutorServiceVariablePoolTest
  • TrendLogObjectTest.localPolling

Tickets handled here:

Ticket not handled here:

@@ -175,8 +176,10 @@ public boolean isLogDisabled() {
return logDisabled;
}

public LogBuffer<LogMultipleRecord> getBuffer() {
return buffer;
public void withBuffer(Consumer<LogBuffer<LogMultipleRecord>> bufferConsumer) {
Copy link
Author

Choose a reason for hiding this comment

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

This is one of the 2 changes that make the tests pass, accessing the buffer in a thread safe manner.

@@ -204,8 +205,10 @@ public boolean isLogDisabled() {
return logDisabled;
}

public LogBuffer<LogRecord> getBuffer() {
return buffer;
public void withBuffer(Consumer<LogBuffer<LogRecord>> bufferConsumer) {
Copy link
Author

Choose a reason for hiding this comment

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

This is one of the 2 changes that make the tests pass, accessing the buffer in a thread safe manner.

@terrypacker terrypacker requested review from jazdw and a team and removed request for a team February 19, 2025 21:01
Copy link

@jazdw jazdw left a comment

Choose a reason for hiding this comment

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

We talked about this a couple of times, looks good. It's better than before so it's a step in the right direction.

Requires sero-warp 1.0.1-SNAPSHOT (Not released)
As per MANGO-1975
As per MANGO-1975
@terrypacker terrypacker marked this pull request as draft March 6, 2025 01:18
As per MANGO-1975
…e them in tests

As per MANGO-1981
In preparation for MANGO-2061
As per MANGO-1981
In preparation for MANGO-2061
Fix DeviceCommunicationControlRequestTest

As per MANGO-1981
In preparation for MANGO-2061
As per MANGO-1981
In preparation for MANGO-2061
As per MANGO-1981
In preparation for MANGO-2061
As per MANGO-1981
In preparation for MANGO-2061
…and refactor for sonarqube

As per MANGO-1981
In preparation for MANGO-2061
As per MANGO-1981
In preparation for MANGO-2061
As per MANGO-1981
In preparation for MANGO-2061
As per MANGO-1981
In preparation for MANGO-2061
As per MANGO-1981
In preparation for MANGO-2061
As per MANGO-1981
In preparation for MANGO-2061
This is possible as we are creating a "Larger Work" of combined MPL + GNU licensed code
@terrypacker terrypacker marked this pull request as ready for review March 19, 2025 21:37
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@terrypacker terrypacker deleted the test-stability branch July 10, 2025 15:05
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.

2 participants