Skip to content

Commit

Permalink
cmd/storagenode: skip forget-satellite tests
Browse files Browse the repository at this point in the history
Change-Id: I630bba8690e48f219d23a966796849a97657a49a
  • Loading branch information
egonelbre committed Nov 1, 2023
1 parent 9e0fff5 commit 9f39684
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/storagenode/cmd_forget_satellite.go
Expand Up @@ -91,6 +91,7 @@ func cmdForgetSatellite(ctx context.Context, log *zap.Logger, cfg *forgetSatelli
if err != nil {
return errs.New("Error starting master database on storagenode: %+v", err)
}
defer func() { err = errs.Combine(err, db.Close()) }()

satelliteDB := db.Satellites()

Expand Down
12 changes: 12 additions & 0 deletions cmd/storagenode/cmd_forget_satellite_test.go
Expand Up @@ -61,6 +61,8 @@ func Test_newForgetSatelliteCmd_Error(t *testing.T) {
}

func Test_cmdForgetSatellite(t *testing.T) {
t.Skip("The tests and the behavior is currently flaky. See https://github.com/storj/storj/issues/6465")

testplanet.Run(t, testplanet.Config{
SatelliteCount: 2, StorageNodeCount: 1, UplinkCount: 0,
}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) {
Expand All @@ -70,6 +72,7 @@ func Test_cmdForgetSatellite(t *testing.T) {

store, err := filestore.NewAt(log, db.Config().Pieces, filestore.DefaultConfig)
require.NoError(t, err)
defer ctx.Check(store.Close)

satelliteID := planet.Satellites[0].ID()

Expand Down Expand Up @@ -137,6 +140,12 @@ func Test_cmdForgetSatellite(t *testing.T) {
})
require.NoError(t, err)

// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// TODO: this is for reproducing the bug,
// remove it once it's fixed.
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
time.Sleep(10 * time.Second)

// check that the blob was deleted
blobInfo, err := store.Stat(ctx, blobRef)
require.Error(t, err)
Expand All @@ -154,6 +163,8 @@ func Test_cmdForgetSatellite(t *testing.T) {
}

func Test_cmdForgetSatellite_Exclusions(t *testing.T) {
t.Skip("The tests and the behavior is currently flaky. See https://github.com/storj/storj/issues/6465")

testplanet.Run(t, testplanet.Config{
SatelliteCount: 2, StorageNodeCount: 1, UplinkCount: 0,
}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) {
Expand All @@ -163,6 +174,7 @@ func Test_cmdForgetSatellite_Exclusions(t *testing.T) {

store, err := filestore.NewAt(log, db.Config().Pieces, filestore.DefaultConfig)
require.NoError(t, err)
defer ctx.Check(store.Close)

satelliteID := planet.Satellites[0].ID()

Expand Down
2 changes: 2 additions & 0 deletions storagenode/pieces/cache_test.go
Expand Up @@ -199,6 +199,7 @@ func TestCacheServiceRun(t *testing.T) {

store, err := filestore.NewAt(log, db.Config().Pieces, filestore.DefaultConfig)
require.NoError(t, err)
defer ctx.Check(store.Close)

// Prior to initializing the cache service (which should walk the files),
// write a single file so something exists to be counted
Expand Down Expand Up @@ -279,6 +280,7 @@ func TestCacheServiceRun_LazyFilewalker(t *testing.T) {

store, err := filestore.NewAt(log, dbConfig.Pieces, dbConfig.Filestore)
require.NoError(t, err)
defer ctx.Check(store.Close)

// Prior to initializing the cache service (which should walk the files),
// write a single file so something exists to be counted
Expand Down

0 comments on commit 9f39684

Please sign in to comment.