[client] Remove test scenario (#2447)

Fix the flickering test.
Because we eliminated the direct property, can flicker a test because any output could be valid. Remove unnecessary test cases.
This commit is contained in:
Zoltan Papp 2024-08-21 10:27:02 +02:00 committed by GitHub
parent 4d162f1750
commit 3bd820f2e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 28 deletions

View File

@ -144,33 +144,6 @@ func TestGetBestrouteFromStatuses(t *testing.T) {
currentRoute: "",
expectedRouteID: "route1",
},
{
name: "multiple connected peers with one direct",
statuses: map[route.ID]routerPeerStatus{
"route1": {
connected: true,
relayed: false,
},
"route2": {
connected: true,
relayed: false,
},
},
existingRoutes: map[route.ID]*route.Route{
"route1": {
ID: "route1",
Metric: route.MaxMetric,
Peer: "peer1",
},
"route2": {
ID: "route2",
Metric: route.MaxMetric,
Peer: "peer2",
},
},
currentRoute: "",
expectedRouteID: "route1",
},
{
name: "multiple connected peers with different latencies",
statuses: map[route.ID]routerPeerStatus{

View File

@ -2,6 +2,7 @@ package healthcheck
import (
"context"
"os"
"testing"
"time"
)
@ -10,7 +11,8 @@ func TestMain(m *testing.M) {
// override the health check interval to speed up the test
healthCheckInterval = 1 * time.Second
healthCheckTimeout = 100 * time.Millisecond
m.Run()
code := m.Run()
os.Exit(code)
}
func TestNewHealthPeriod(t *testing.T) {