Skip to content

refactor: write replica pid to file to fix flaky test#1175

Merged
mergify[bot] merged 2 commits intomasterfrom
pshahi/write-replica-pid-to-file
Nov 11, 2020
Merged

refactor: write replica pid to file to fix flaky test#1175
mergify[bot] merged 2 commits intomasterfrom
pshahi/write-replica-pid-to-file

Conversation

@p-shahi
Copy link
Contributor

@p-shahi p-shahi commented Nov 11, 2020

Because the e2e test cases run in parallel, REPLICA_PID=$(ps x | grep [/[:space:]]replica | awk '{print $1}') in start.bash could return the PID for the wrong replica process. Instead, dfx will now write the pid to file; the e2e test can read the file content to reliably kill the correct replica

@p-shahi p-shahi requested review from a user and hansl November 11, 2020 01:34
@mergify mergify bot merged commit 8f2e96d into master Nov 11, 2020
@mergify mergify bot deleted the pshahi/write-replica-pid-to-file branch November 11, 2020 01:49
@p-shahi p-shahi linked an issue Nov 19, 2020 that may be closed by this pull request
assert_no_dfx_start_or_replica_processes() {
! ( ps | grep "[/[:space:]]dfx start" )
! ( ps | grep "[/[:space:]]replica" )
! ( ps | cat .dfx/replica-configuration/replica-pid )
Copy link
Contributor

Choose a reason for hiding this comment

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

That's not the right assertion. You need to grep the content of the file, not pipe into a cat (which is afaik no op)

@p-shahi
Copy link
Contributor Author

p-shahi commented Dec 8, 2020

#1240

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.

dfx e2e bats tests fail spuriously when run locally

2 participants