Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skip changelog] tests/cli: fix flapping tests #10600

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions test/cli/delegated_routing_v1_http_proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ func TestRoutingV1Proxy(t *testing.T) {
t.Parallel()

setupNodes := func(t *testing.T) harness.Nodes {
nodes := harness.NewT(t).NewNodes(2).Init()
nodes := harness.NewT(t).NewNodes(3).Init()

// Node 0 uses DHT and exposes the Routing API.
// Node 0 uses DHT and exposes the Routing API. For the DHT
// to actually work there will need to be another DHT-enabled
// node.
nodes[0].UpdateConfig(func(cfg *config.Config) {
cfg.Gateway.ExposeRoutingAPI = config.True
cfg.Discovery.MDNS.Enabled = false
Expand Down Expand Up @@ -49,6 +51,15 @@ func TestRoutingV1Proxy(t *testing.T) {
})
nodes[1].StartDaemon()

// This is the second DHT node. Only used so that the DHT is
// operative.
nodes[2].UpdateConfig(func(cfg *config.Config) {
cfg.Gateway.ExposeRoutingAPI = config.True
cfg.Discovery.MDNS.Enabled = false
cfg.Routing.Type = config.NewOptionalString("dht")
})
nodes[2].StartDaemon()

// Connect them.
nodes.Connect()

Expand Down
Loading