From 9132f28a52b372efe0b13678db41d125ee37c358 Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Thu, 4 Oct 2018 10:10:15 +0800 Subject: test: Short test applied to some long running tests (#168) --- core/lattice_test.go | 5 +++++ core/total-ordering_test.go | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'core') 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. -- cgit v1.2.3