Skip to content

Commit

Permalink
Switch DNS resolution to prefer IPv4 in tests
Browse files Browse the repository at this point in the history
In the Cloudflare Workers local tests, Node seems to prefer resolving to
IPv6, but the Wrangler server is only listening to IPv4, which results
in "connection refused" errors. Fix the problem by forcing Node to
prefer IPv4 for DNS resolution.
  • Loading branch information
penberg committed Jan 18, 2024
1 parent 8eb2f93 commit f472fd3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,19 @@ jobs:
run: "cd smoke_test/workers && npm link ../.."

- name: "Local test with Hrana 1 over WebSocket"
run: "cd smoke_test/workers && python ../../hrana-test-server/server_v1.py node test.js"
run: "cd smoke_test/workers && python ../../hrana-test-server/server_v1.py node --dns-result-order=ipv4first test.js"
env: {"LOCAL": "1", "URL": "ws://localhost:8080"}
- name: "Local test with Hrana 2 over WebSocket"
run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node test.js"
run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node --dns-result-order=ipv4first test.js"
env: {"LOCAL": "1", "URL": "ws://localhost:8080"}
- name: "Local test with Hrana 2 over HTTP"
run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node test.js"
run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node --dns-result-order=ipv4first test.js"
env: {"LOCAL": "1", "URL": "http://localhost:8080"}
# - name: "Local test with Hrana 3 over WebSocket"
# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v3.py node test.js"
# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v3.py node --dns-result-order=ipv4first test.js"
# env: {"LOCAL": "1", "URL": "ws://localhost:8080"}
# - name: "Local test with Hrana 3 over HTTP"
# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v3.py node test.js"
# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v3.py node --dns-result-order=ipv4first test.js"
# env: {"LOCAL": "1", "URL": "http://localhost:8080"}

# - name: "Non-local test with Hrana 1 over WebSocket"
Expand Down

0 comments on commit f472fd3

Please sign in to comment.