@@ -113,6 +113,9 @@ func TestFreezerBasicsClosing(t *testing.T) {
113
113
f .Append (uint64 (x ), data )
114
114
f .Close ()
115
115
f , err = newCustomTable (os .TempDir (), fname , rm , wm , sc , 50 , true )
116
+ if err != nil {
117
+ t .Fatal (err )
118
+ }
116
119
}
117
120
defer f .Close ()
118
121
@@ -170,6 +173,9 @@ func TestFreezerRepairDanglingHead(t *testing.T) {
170
173
// Now open it again
171
174
{
172
175
f , err := newCustomTable (os .TempDir (), fname , rm , wm , sc , 50 , true )
176
+ if err != nil {
177
+ t .Fatal (err )
178
+ }
173
179
// The last item should be missing
174
180
if _ , err = f .Retrieve (0xff ); err == nil {
175
181
t .Errorf ("Expected error for missing index entry" )
@@ -217,6 +223,9 @@ func TestFreezerRepairDanglingHeadLarge(t *testing.T) {
217
223
// Now open it again
218
224
{
219
225
f , err := newCustomTable (os .TempDir (), fname , rm , wm , sc , 50 , true )
226
+ if err != nil {
227
+ t .Fatal (err )
228
+ }
220
229
// The first item should be there
221
230
if _ , err = f .Retrieve (0 ); err != nil {
222
231
t .Fatal (err )
@@ -269,6 +278,9 @@ func TestSnappyDetection(t *testing.T) {
269
278
// Open without snappy
270
279
{
271
280
f , err := newCustomTable (os .TempDir (), fname , rm , wm , sc , 50 , false )
281
+ if err != nil {
282
+ t .Fatal (err )
283
+ }
272
284
if _ , err = f .Retrieve (0 ); err == nil {
273
285
f .Close ()
274
286
t .Fatalf ("expected empty table" )
@@ -278,6 +290,9 @@ func TestSnappyDetection(t *testing.T) {
278
290
// Open with snappy
279
291
{
280
292
f , err := newCustomTable (os .TempDir (), fname , rm , wm , sc , 50 , true )
293
+ if err != nil {
294
+ t .Fatal (err )
295
+ }
281
296
// There should be 255 items
282
297
if _ , err = f .Retrieve (0xfe ); err != nil {
283
298
f .Close ()
0 commit comments