Skip to content

Commit

Permalink
Try #6193:
Browse files Browse the repository at this point in the history
  • Loading branch information
spacemesh-bors[bot] authored Jul 30, 2024
2 parents f46277b + 026c847 commit bd7a900
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/systest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
inputs:
test_name:
description: "Test to run"
default: "."
default: "TestCheckpoint"
log_level:
description: "Log level"
default: "debug"
Expand Down
36 changes: 34 additions & 2 deletions cmd/bootstrapper/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,40 @@ func (s *Server) Start(ctx context.Context, errCh chan error, params *NetworkPar
// start generating fallback data
s.eg.Go(
func() error {
s.genDataLoop(ctx, errCh, last, params.updateActiveSetTime, s.GenFallbackActiveSet)
return nil
var (
errs = 0
maxErrs = 10
timer *time.Timer
timeC <-chan time.Time
backoff = 10 * time.Second
)
for epoch := last; ; epoch++ {
wait := time.Until(params.updateActiveSetTime(epoch))
select {
case <-timeC:
if err := s.GenFallbackActiveSet(ctx, epoch); err != nil {
errs++
timer.Reset(backoff)
continue
}
errs = 0
if !timer.Stop() {
<-timer.C
}
timeC = nil
case <-time.After(wait):
if err := s.GenFallbackActiveSet(ctx, epoch); err != nil {
timer = time.NewTimer(backoff)
timeC = timer.C
if errs >= maxErrs {
errCh <- err
return err
}
}
case <-ctx.Done():
return ctx.Err()
}
}
})
s.eg.Go(
func() error {
Expand Down
15 changes: 15 additions & 0 deletions systest/tests/checkpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ func reuseCluster(tctx *testcontext.Context, restoreLayer uint32) (*cluster.Clus
)
}

func TestCheckpoint1(t *testing.T) {
// t.Parallel()
TestCheckpoint(t)
}

func TestCheckpoint2(t *testing.T) {
// t.Parallel()
TestCheckpoint(t)
}

func TestCheckpoint3(t *testing.T) {
// t.Parallel()
TestCheckpoint(t)
}

func TestCheckpoint(t *testing.T) {
// TODO(mafa): add new test with multi-smeshing nodes
t.Parallel()
Expand Down
1 change: 1 addition & 0 deletions systest/tests/distributed_post_verification_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
)

func TestPostMalfeasanceProof(t *testing.T) {
t.Skip()
t.Parallel()
testDir := t.TempDir()

Expand Down
1 change: 1 addition & 0 deletions systest/tests/equivocation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
)

func TestEquivocation(t *testing.T) {
t.Skip()
t.Parallel()
const bootnodes = 2
cctx := testcontext.New(t)
Expand Down
1 change: 1 addition & 0 deletions systest/tests/fallback_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
)

func TestFallback(t *testing.T) {
t.Skip()
t.Parallel()

tctx := testcontext.New(t)
Expand Down
2 changes: 2 additions & 0 deletions systest/tests/nodes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func init() {
}

func TestAddNodes(t *testing.T) {
t.Skip()
t.Parallel()

const (
Expand Down Expand Up @@ -125,6 +126,7 @@ func TestAddNodes(t *testing.T) {
}

func TestFailedNodes(t *testing.T) {
t.Skip()
t.Parallel()

tctx := testcontext.New(t)
Expand Down
2 changes: 2 additions & 0 deletions systest/tests/partition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ func testPartition(t *testing.T, tctx *testcontext.Context, cl *cluster.Cluster,
}

func TestPartition_30_70(t *testing.T) {
t.Skip()
t.Parallel()

tctx := testcontext.New(t)
Expand All @@ -190,6 +191,7 @@ func TestPartition_30_70(t *testing.T) {
}

func TestPartition_50_50(t *testing.T) {
t.Skip()
t.Parallel()

tctx := testcontext.New(t)
Expand Down
3 changes: 3 additions & 0 deletions systest/tests/poets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var layersToCheck = parameters.Int(
)

func TestPoetsFailures(t *testing.T) {
t.Skip()
t.Parallel()
tctx := testcontext.New(t)
tctx.Log.Debug("TestPoetsFailures start")
Expand Down Expand Up @@ -123,6 +124,7 @@ func testPoetDies(t *testing.T, tctx *testcontext.Context, cl *cluster.Cluster)
}

func TestNodesUsingDifferentPoets(t *testing.T) {
t.Skip()
t.Parallel()
tctx := testcontext.New(t)
if tctx.PoetSize < 2 {
Expand Down Expand Up @@ -213,6 +215,7 @@ func TestNodesUsingDifferentPoets(t *testing.T) {
// TODO: When PoW support is removed, convert this test to verify only the cert path.
// https://github.com/spacemeshos/go-spacemesh/issues/5212
func TestRegisteringInPoetWithPowAndCert(t *testing.T) {
t.Skip()
t.Parallel()
tctx := testcontext.New(t)
tctx.PoetSize = 2
Expand Down
1 change: 1 addition & 0 deletions systest/tests/smeshing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
)

func TestSmeshing(t *testing.T) {
t.Skip()
// TODO(mafa): add new test with multi-smeshing nodes
t.Parallel()

Expand Down
1 change: 1 addition & 0 deletions systest/tests/timeskew_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
)

func TestShortTimeskew(t *testing.T) {
t.Skip()
t.Parallel()

tctx := testcontext.New(t)
Expand Down

0 comments on commit bd7a900

Please sign in to comment.