Skip to content

Commit de30e58

Browse files
memodiclaude
andcommitted
Skip waitDaemonset in E2E mode to prevent race condition
In E2E test mode, the bash script's waitDaemonset() could exit with error after 10 minutes while the Go test's isDaemonsetReady() was still polling. This created a race where: 1. Go test calls StartCommand() which runs bash script async 2. Bash script calls waitDaemonset() and waits 10 mins 3. Go test calls isDaemonsetReady() and waits 10 mins 4. If bash times out first, it calls exit 1, killing the process 5. Go test is left polling a dead command Solution: When isE2E=true, skip the bash-level wait since the Go test framework handles pod readiness checking via isDaemonsetReady(). For manual CLI usage (isE2E=false), the wait still runs as before to provide user feedback. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e2dec96 commit de30e58

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/functions.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,12 @@ function defaultValue() {
779779
}
780780

781781
function waitDaemonset(){
782+
# In E2E test mode, skip waiting here as Go tests handle it via isDaemonsetReady()
783+
if [[ "$isE2E" = true ]]; then
784+
echo "E2E mode: Skipping daemonset wait (handled by test framework)"
785+
return 0
786+
fi
787+
782788
echo "Waiting for daemonset pods to be ready..."
783789
# Increase timeout for CI environments where image pulls can be slow
784790
# 60 retries × 10 seconds = 10 minutes total

0 commit comments

Comments
 (0)