Skip to content

Commit 7f735b1

Browse files
nic-6443Copilot
andcommitted
fix(test): add sleep to avoid race in stream route DNS test
The curl to port 9100 was firing before the etcd stream-route change propagated to the stream workers, causing 'matched route: null' and skipping DNS resolution. Add a 1s sleep after the admin PUT to let the config sync complete before making the test request. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ee80ffd commit 7f735b1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

t/cli/test_dns.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ curl -v -k -i -m 20 -o /dev/null -s -X PUT http://127.0.0.1:9180/apisix/admin/st
158158
}
159159
}'
160160

161+
sleep 1 # wait for the stream route to propagate from etcd to stream workers
161162
curl http://127.0.0.1:9100 || true
162163
make stop
163164
sleep 0.1 # wait for logs output

0 commit comments

Comments
 (0)