Skip to content

Commit 646eab4

Browse files
committed
bitswap/httpnet: fix more tests. bump go
1 parent d2e0631 commit 646eab4

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

bitswap/network/bsnet/ipfs_impl_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ func TestMessageResendAfterError(t *testing.T) {
346346
if err != nil {
347347
t.Fatal(err)
348348
}
349-
defer ms.Close()
349+
defer ms.Reset()
350350

351351
// Return an error from the networking layer the next time we try to send
352352
// a message
@@ -391,7 +391,7 @@ func TestMessageSendTimeout(t *testing.T) {
391391
if err != nil {
392392
t.Fatal(err)
393393
}
394-
defer ms.Close()
394+
defer ms.Reset()
395395

396396
// Return a DeadlineExceeded error from the networking layer the next time we try to
397397
// send a message
@@ -431,7 +431,7 @@ func TestMessageSendNotSupportedResponse(t *testing.T) {
431431
SendErrorBackoff: 100 * time.Millisecond,
432432
})
433433
if err == nil {
434-
ms.Close()
434+
ms.Reset()
435435
t.Fatal("Expected ErrNotSupported")
436436
}
437437

@@ -487,7 +487,7 @@ func TestSupportsHave(t *testing.T) {
487487
if err != nil {
488488
t.Fatal(err)
489489
}
490-
defer senderCurrent.Close()
490+
defer senderCurrent.Reset()
491491

492492
if senderCurrent.SupportsHave() != tc.expSupportsHave {
493493
t.Fatal("Expected sender HAVE message support", tc.proto, tc.expSupportsHave)
@@ -537,7 +537,7 @@ func testNetworkCounters(t *testing.T, n1 int, n2 int) {
537537
if err != nil {
538538
t.Fatal(err)
539539
}
540-
defer ms.Close()
540+
defer ms.Reset()
541541
for n := 0; n < n2; n++ {
542542
ctx, cancel := context.WithTimeout(ctx, time.Second)
543543
err = ms.SendMsg(ctx, msg)
@@ -562,7 +562,7 @@ func testNetworkCounters(t *testing.T, n1 int, n2 int) {
562562
}
563563
cancel()
564564
}
565-
ms.Close()
565+
ms.Reset()
566566
}
567567

568568
// Wait until all streams are closed and MessagesRecvd counters

go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ module github.com/ipfs/boxo
22

33
go 1.23
44

5+
toolchain go1.23.4
6+
57
require (
68
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b
79
github.com/cespare/xxhash/v2 v2.3.0
@@ -12,7 +14,6 @@ require (
1214
github.com/gabriel-vasile/mimetype v1.4.6
1315
github.com/gammazero/chanqueue v1.0.0
1416
github.com/gammazero/deque v1.0.0
15-
github.com/gogo/protobuf v1.3.2
1617
github.com/google/uuid v1.6.0
1718
github.com/gorilla/mux v1.8.1
1819
github.com/hashicorp/go-multierror v1.1.1
@@ -55,7 +56,6 @@ require (
5556
github.com/multiformats/go-multihash v0.2.3
5657
github.com/multiformats/go-multistream v0.6.0
5758
github.com/polydawn/refmt v0.89.0
58-
github.com/prometheus-community/pro-bing v0.5.0
5959
github.com/prometheus/client_golang v1.20.5
6060
github.com/samber/lo v1.47.0
6161
github.com/slok/go-http-metrics v0.12.0
@@ -100,6 +100,7 @@ require (
100100
github.com/go-logr/stdr v1.2.2 // indirect
101101
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
102102
github.com/godbus/dbus/v5 v5.1.0 // indirect
103+
github.com/gogo/protobuf v1.3.2 // indirect
103104
github.com/google/gopacket v1.1.19 // indirect
104105
github.com/google/pprof v0.0.0-20250202011525-fc3143867406 // indirect
105106
github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c // indirect

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
424424
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
425425
github.com/polydawn/refmt v0.89.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4=
426426
github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw=
427-
github.com/prometheus-community/pro-bing v0.5.0 h1:Fq+4BUXKIvsPtXUY8K+04ud9dkAuFozqGmRAyNUpffY=
428-
github.com/prometheus-community/pro-bing v0.5.0/go.mod h1:1joR9oXdMEAcAJJvhs+8vNDvTg5thfAZcRFhcUozG2g=
429427
github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
430428
github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y=
431429
github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=

0 commit comments

Comments
 (0)