@@ -30,10 +30,6 @@ func Test_Issue16_LongURLFragmentation(t *testing.T) {
3030 t .Attr ("GOARCH" , runtime .GOARCH )
3131 t .Attr ("GOVERSION" , runtime .Version ())
3232
33- tempDir := t .TempDir ()
34- cache , err := Open ("test-fragmentation" , WithBaseDir (tempDir ))
35- testutil .RequireNoError (t , err )
36-
3733 tests := []struct {
3834 name string
3935 urlLen int
@@ -56,6 +52,9 @@ func Test_Issue16_LongURLFragmentation(t *testing.T) {
5652
5753 for _ , tt := range tests {
5854 t .Run (tt .name , func (t * testing.T ) {
55+ cache , err := Open ("test-fragmentation" , WithBaseDir (t .TempDir ()))
56+ testutil .RequireNoError (t , err )
57+
5958 // Generate URL of specified length
6059 url := "https://example.com/" + strings .Repeat (
6160 "x" ,
@@ -71,7 +70,7 @@ func Test_Issue16_LongURLFragmentation(t *testing.T) {
7170
7271 // Test round-trip: Set -> Get -> Delete
7372 data := []byte ("test data" )
74- err : = cache .Set (url , data )
73+ err = cache .Set (url , data )
7574
7675 if tt .expectOK {
7776 testutil .RequireNoError (t , err )
0 commit comments