This repository was archived by the owner on Jun 27, 2023. It is now read-only.
File tree 2 files changed +20
-6
lines changed
2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,18 @@ func TestWriteThroughWorks(t *testing.T) {
26
26
block := bgen .Next ()
27
27
28
28
t .Logf ("PutCounter: %d" , bstore .PutCounter )
29
- bserv .AddBlock (block )
29
+ err := bserv .AddBlock (block )
30
+ if err != nil {
31
+ t .Fatal (err )
32
+ }
30
33
if bstore .PutCounter != 1 {
31
34
t .Fatalf ("expected just one Put call, have: %d" , bstore .PutCounter )
32
35
}
33
36
34
- bserv .AddBlock (block )
37
+ err = bserv .AddBlock (block )
38
+ if err != nil {
39
+ t .Fatal (err )
40
+ }
35
41
if bstore .PutCounter != 2 {
36
42
t .Fatalf ("Put should have called again, should be 2 is: %d" , bstore .PutCounter )
37
43
}
@@ -52,10 +58,15 @@ func TestLazySessionInitialization(t *testing.T) {
52
58
bgen := butil .NewBlockGenerator ()
53
59
54
60
block := bgen .Next ()
55
- bstore .Put (block )
56
-
61
+ err := bstore .Put (block )
62
+ if err != nil {
63
+ t .Fatal (err )
64
+ }
57
65
block2 := bgen .Next ()
58
- session .HasBlock (block2 )
66
+ err = session .HasBlock (block2 )
67
+ if err != nil {
68
+ t .Fatal (err )
69
+ }
59
70
60
71
bsession := NewSession (ctx , bservSessEx )
61
72
if bsession .ses != nil {
Original file line number Diff line number Diff line change @@ -74,7 +74,10 @@ func TestGetBlocksSequential(t *testing.T) {
74
74
var cids []cid.Cid
75
75
for _ , o := range objs {
76
76
cids = append (cids , o .Cid ())
77
- servs [0 ].AddBlock (o )
77
+ err := servs [0 ].AddBlock (o )
78
+ if err != nil {
79
+ t .Fatal (err )
80
+ }
78
81
}
79
82
80
83
t .Log ("one instance at a time, get blocks concurrently" )
You can’t perform that action at this time.
0 commit comments