@@ -27,7 +27,7 @@ func TestWriteThroughWorks(t *testing.T) {
2727 }
2828 exchbstore := blockstore .NewBlockstore (dssync .MutexWrap (ds .NewMapDatastore ()))
2929 exch := offline .Exchange (exchbstore )
30- bserv := NewWriteThrough (bstore , exch )
30+ bserv := New (bstore , exch , WriteThrough () )
3131 bgen := butil .NewBlockGenerator ()
3232
3333 block := bgen .Next ()
@@ -62,7 +62,7 @@ func TestExchangeWrite(t *testing.T) {
6262 offline .Exchange (exchbstore ),
6363 0 ,
6464 }
65- bserv := NewWriteThrough (bstore , exch )
65+ bserv := New (bstore , exch , WriteThrough () )
6666 bgen := butil .NewBlockGenerator ()
6767
6868 for name , fetcher := range map [string ]BlockGetter {
@@ -136,7 +136,7 @@ func TestLazySessionInitialization(t *testing.T) {
136136 session := offline .Exchange (bstore2 )
137137 exch := offline .Exchange (bstore3 )
138138 sessionExch := & fakeSessionExchange {Interface : exch , session : session }
139- bservSessEx := NewWriteThrough (bstore , sessionExch )
139+ bservSessEx := New (bstore , sessionExch , WriteThrough () )
140140 bgen := butil .NewBlockGenerator ()
141141
142142 block := bgen .Next ()
@@ -234,7 +234,7 @@ func TestNilExchange(t *testing.T) {
234234 block := bgen .Next ()
235235
236236 bs := blockstore .NewBlockstore (dssync .MutexWrap (ds .NewMapDatastore ()))
237- bserv := NewWriteThrough (bs , nil )
237+ bserv := New (bs , nil , WriteThrough () )
238238 sess := NewSession (ctx , bserv )
239239 _ , err := sess .GetBlock (ctx , block .Cid ())
240240 if ! ipld .IsNotFound (err ) {
0 commit comments