Conversation
…g it (G-090)
The floor leg failed once in "a call during the restart gap is answered...": snapshot/1
answered {:error, :not_started} after the loop had found the restarted pid. GenServer
registers the name before init/1 runs, and init/1 creates the table snapshot/1 reads, so a
poll on the name can land between the two; the floor runner is slow enough to. Both restart
tests now make a call to the new process (:sys.get_state/1, answered only after init returns)
before reading it. Measured: with a 200 ms sleep put into init/1 before the table, the old
tests fail (both of them: the kill test had the same window, latent) and the new ones pass;
unmodified, 30 seeds, 0 failures. No package change: the gap is the collector's documented
restart gap, and it ends when init returns.
Signed-off-by: Ayla Croft <aylacroft@proton.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The floor leg failed once on #78's PR run ("a call during the restart gap is answered..."):
snapshot/1answered{:error, :not_started}right after the test found the restarted pid. GenServer registers the name beforeinit/1runs, andinit/1creates the tablesnapshot/1reads, so the test could read in between.Both restart tests now call the new process (
:sys.get_state/1, answered only afterinitreturns) before reading it. Evidence: with a 200 ms sleep forced intoinit/1, the old tests fail (both; the kill test had the same latent window) and the new ones pass; unmodified, 30 seeds, 0 failures. Test-only; local gate passes.