cameronlee314 opened a new pull request #1334: SAMZA-2496: 
TestContainerHeartbeatMonitor does not properly stop the 
ContainerHeartbeatMonitor
URL: https://github.com/apache/samza/pull/1334
 
 
   Symptom: In some environments, the samza-core unit test suite fails with 
`Process 'Gradle Test Executor N' finished with non-zero exit value 1 This 
problem might be caused by incorrect test process configuration.`
   Cause: `ContainerHeartbeatMonitor` submits a delayed "force shutdown" task 
(uses `System.exit(1)`) to shut down the process when the job coordinator dies. 
In `TestContainerHeartbeatMonitor`, this "force shutdown" task is not cancelled 
when the test is complete. If the remainder of the samza-core tests last longer 
than the shutdown timeout (2 minutes), then the shutdown task will kill the 
test suite process with an exit code of 1. In some environments, 
`TestContainerHeartbeatMonitor` runs late enough in the test suite (it seems 
like the ordering of test classes is non-deterministic) that the test suite 
finishes successfully before the 2 minute timeout, so this error is not always 
seen.
   Fix: In the test, mock the executor service so that the "force shutdown" 
task never runs.
   Tests: Reduced the force shutdown timeout to 3 seconds in order to 
consistently reproduce the issue before the change. Then, applied the change 
and kept the 3-second timeout and verified that there no longer was an issue.
   API/Usage changes: N/A

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to