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