aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-10-04 10:10:15 +0800
committerGitHub <noreply@github.com>2018-10-04 10:10:15 +0800
commit9132f28a52b372efe0b13678db41d125ee37c358 (patch)
treef5401256e69114848c877cc700176072d3337868 /core
parent64efb7a31383c912b3980b02c7e6dea34247aaf7 (diff)
downloaddexon-consensus-9132f28a52b372efe0b13678db41d125ee37c358.tar
dexon-consensus-9132f28a52b372efe0b13678db41d125ee37c358.tar.gz
dexon-consensus-9132f28a52b372efe0b13678db41d125ee37c358.tar.bz2
dexon-consensus-9132f28a52b372efe0b13678db41d125ee37c358.tar.lz
dexon-consensus-9132f28a52b372efe0b13678db41d125ee37c358.tar.xz
dexon-consensus-9132f28a52b372efe0b13678db41d125ee37c358.tar.zst
dexon-consensus-9132f28a52b372efe0b13678db41d125ee37c358.zip
test: Short test applied to some long running tests (#168)
Diffstat (limited to 'core')
-rw-r--r--core/lattice_test.go5
-rw-r--r--core/total-ordering_test.go8
2 files changed, 11 insertions, 2 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.