summaryrefslogtreecommitdiff
path: root/cmd/algoh/blockWatcher_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/algoh/blockWatcher_test.go')
-rw-r--r--cmd/algoh/blockWatcher_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/algoh/blockWatcher_test.go b/cmd/algoh/blockWatcher_test.go
index 5aeec2064..8ed724c20 100644
--- a/cmd/algoh/blockWatcher_test.go
+++ b/cmd/algoh/blockWatcher_test.go
@@ -23,6 +23,7 @@ import (
"time"
"github.com/algorand/go-algorand/daemon/algod/api/spec/v1"
+ "github.com/algorand/go-algorand/test/partitiontest"
"github.com/stretchr/testify/require"
)
@@ -38,6 +39,7 @@ func bw(client Client) *blockWatcher {
// When the status continues to report block 300
// Then blockIfStalled will block until the next block is reported
func TestBlockIfStalled(t *testing.T) {
+ partitiontest.PartitionTest(t)
client := mockClient{
error: []error{nil, nil, nil},
status: makeNodeStatuses(300, 300, 300, 301),
@@ -59,6 +61,7 @@ func TestBlockIfStalled(t *testing.T) {
// When the status continues to increase quickly
// Then blockIfCatchup will block until a block is reported twice
func TestBlockIfCatchup(t *testing.T) {
+ partitiontest.PartitionTest(t)
client := mockClient{
error: []error{nil, nil, nil},
status: makeNodeStatuses(301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 310),
@@ -80,6 +83,7 @@ func TestBlockIfCatchup(t *testing.T) {
// When the status is not changing quickly
// Then blockIfCatchup will return after the first status call.
func TestBlockIfCaughtUp(t *testing.T) {
+ partitiontest.PartitionTest(t)
client := mockClient{
error: []error{nil, nil, nil},
status: makeNodeStatuses(300),
@@ -111,6 +115,7 @@ func (l *testlistener) onBlock(block v1.Block) {
}
func TestE2E(t *testing.T) {
+ partitiontest.PartitionTest(t)
client := makeMockClient(
[]error{nil, nil, nil},
makeNodeStatuses(300, 301, 302, 302, 302, 302, 302, 302, 310, 320, 321, 321, 321, 322),
@@ -159,6 +164,7 @@ func TestE2E(t *testing.T) {
}
func TestAbortDuringStall(t *testing.T) {
+ partitiontest.PartitionTest(t)
client := makeMockClient(
[]error{},
makeNodeStatuses(300),