p2p/simulations: replace reflect.DeepEqual with maps.Equal

This commit is contained in:
cuiweixie 2024-04-02 19:33:07 +08:00
parent 0bd03dbc55
commit 2bc3536299

View file

@ -21,10 +21,10 @@ import (
"flag" "flag"
"fmt" "fmt"
"log/slog" "log/slog"
"maps"
"math/rand" "math/rand"
"net/http/httptest" "net/http/httptest"
"os" "os"
"reflect"
"sync" "sync"
"sync/atomic" "sync/atomic"
"testing" "testing"
@ -459,7 +459,7 @@ loop:
if actual[filter] > expected[filter] { if actual[filter] > expected[filter] {
t.Fatalf("received too many msgs for filter: %v", filter) t.Fatalf("received too many msgs for filter: %v", filter)
} }
if reflect.DeepEqual(actual, expected) { if maps.Equal(actual, expected) {
return return
} }