diff options
-rw-r--r-- | core/lattice_test.go | 5 | ||||
-rw-r--r-- | core/total-ordering_test.go | 8 | ||||
-rw-r--r-- | integration_test/non-byzantine_test.go | 6 |
3 files changed, 16 insertions, 3 deletions
diff --git a/core/lattice_test.go b/core/lattice_test.go index 1df4f4e..1be9a0e 100644 --- a/core/lattice_test.go +++ b/core/lattice_test.go @@ -519,6 +519,11 @@ func (s *LatticeTestSuite) TestRandomlyGeneratedBlocks() { datum []*latticeData ) + if testing.Short() { + chainNum = 7 + repeat = 3 + } + // Prepare a randomly generated blocks. db, err := blockdb.NewMemBackedBlockDB() req.Nil(err) diff --git a/core/total-ordering_test.go b/core/total-ordering_test.go index 347ef22..fcadc89 100644 --- a/core/total-ordering_test.go +++ b/core/total-ordering_test.go @@ -945,11 +945,15 @@ func (s *TotalOrderingTestSuite) baseTestRandomlyGeneratedBlocks( func (s *TotalOrderingTestSuite) TestRandomlyGeneratedBlocks() { var ( round uint64 - chainNum = uint32(13) + chainNum = uint32(23) blockNum = 50 phi uint64 = 10 - repeat = 8 + repeat = 15 ) + if testing.Short() { + chainNum = 7 + repeat = 3 + } ackingCountGenerators := []func() int{ nil, // Acking frequency with normal distribution. diff --git a/integration_test/non-byzantine_test.go b/integration_test/non-byzantine_test.go index 34c6be1..df08b97 100644 --- a/integration_test/non-byzantine_test.go +++ b/integration_test/non-byzantine_test.go @@ -32,6 +32,10 @@ type NonByzantineTestSuite struct { } func (s *NonByzantineTestSuite) TestNonByzantine() { + numNodes := 25 + if testing.Short() { + numNodes = 7 + } var ( networkLatency = &test.NormalLatencyModel{ Sigma: 20, @@ -47,7 +51,7 @@ func (s *NonByzantineTestSuite) TestNonByzantine() { ) apps, dbs, nodes, err := PrepareNodes( - 25, networkLatency, proposingLatency) + numNodes, networkLatency, proposingLatency) req.Nil(err) now := time.Now().UTC() sch := test.NewScheduler(test.NewStopByConfirmedBlocks(50, apps, dbs)) |