provider tests: the fake claude auth login ends once its test's folder is gone, rather than polling for ever — a TestClaudeSignInByPaste run that ended without signing in left its fake looping every 50ms for 2 days (pid seen 10-06, ppid 1). Its loop waits for the callback's file or the pasted code, both in a TempDir the test removed, so neither ever came. Checked: the loop body exits 3 after its folder is removed; TestClaudeSignIn*, TestClaudeSavedAccountDir pass -race -count=5.
This commit is contained in:
1 parent
6e53ee1f1d
commit
38a0f4709c
1 file changed
+3
@@ -61,6 +61,9 @@ exec 3<&0
|
||||
( while read -r line; do echo "$line" >> "$CLAUDE_CONFIG_DIR/.pasted"; done ) <&3 >/dev/null 2>&1 &
|
||||
reader=$!
|
||||
while :; do
|
||||
# a test that ended without signing in removed this folder: end, rather
|
||||
# than poll for ever (one did for days after its run)
|
||||
[ -d "${0%%/*}" ] || exit 3
|
||||
[ -f '%s' ] && break
|
||||
grep -qx 'the-code#st' "$CLAUDE_CONFIG_DIR/.pasted" 2>/dev/null && break
|
||||
sleep 0.05
|
||||
|
||||
Reference in new issue
Block a user