Commit 23372cd8 authored by jiangpeng's avatar jiangpeng Committed by 33cn

update test

parent e651fe9f
...@@ -383,7 +383,7 @@ func testSyncBlocksIfNeed(t *testing.T, para *client, testLoopCount int32) { ...@@ -383,7 +383,7 @@ func testSyncBlocksIfNeed(t *testing.T, para *client, testLoopCount int32) {
if err != nil { if err != nil {
errorCount++ errorCount++
} }
assert.Equal(t, isSynced, i == 3 || i == 6) assert.Equalf(t, isSynced, i == 3 || i == 6, "i=%d", i)
} }
switch testLoopCount { switch testLoopCount {
......
...@@ -2,6 +2,7 @@ package qbft ...@@ -2,6 +2,7 @@ package qbft
import ( import (
"fmt" "fmt"
"github.com/stretchr/testify/require"
"os" "os"
"testing" "testing"
"time" "time"
...@@ -42,7 +43,8 @@ func TestQbft(t *testing.T) { ...@@ -42,7 +43,8 @@ func TestQbft(t *testing.T) {
time.Sleep(2 * time.Second) time.Sleep(2 * time.Second)
configTx := configManagerTx() configTx := configManagerTx()
mock33.GetAPI().SendTx(configTx) _, err := mock33.GetAPI().SendTx(configTx)
require.Nil(t, err)
mock33.WaitTx(configTx.Hash()) mock33.WaitTx(configTx.Hash())
addTx := addNodeTx() addTx := addNodeTx()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment