Skip to content

Commit

Permalink
feat : add logger proto
Browse files Browse the repository at this point in the history
  • Loading branch information
AgwaB committed Jun 16, 2019
1 parent b9fa76f commit 95b8b6f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
4 changes: 0 additions & 4 deletions test/bba/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,3 @@ func (n *Node) Info() cleisthenes.Address {
func (n *Node) Result() (cleisthenes.Binary, bool) {
return n.bba.Result()
}

func (n *Node) Trace() {
n.bba.Trace()
}
11 changes: 0 additions & 11 deletions test/bba/simulation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,6 @@ func watchResult(nodeList []*bba.Node) *simulationResult {
addr: node.Info(), value: result})
}
}

time.Sleep(1 * time.Second)
iLogger.Info(nil, "sleep ...")
iLogger.Info(nil, "========================trace====================")
for _, node := range nodeList {
iLogger.Info(nil, "------------------------")
iLogger.Info(nil, node.Info().String())
iLogger.Info(nil, "------------------------")
node.Trace()
}

if len(simulationResult.outputList) == len(nodeList) {
break
}
Expand Down
4 changes: 4 additions & 0 deletions test/rbc/rbc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"testing"
"time"

"github.com/DE-labtory/iLogger"

"github.com/DE-labtory/cleisthenes/test/util"

"github.com/DE-labtory/cleisthenes"
Expand Down Expand Up @@ -72,6 +74,8 @@ func RBCTest(proposer *Node, nodeList []*Node, data []byte) error {
if value := node.Value(proposer.address); value != nil {
if !bytes.Equal(value, data) {
return errors.New(fmt.Sprintf("node : %s fail to reach an agreement - expected : %s, got : %s\n", node.address.String(), data, value))
} else {
iLogger.Infof(nil, "node : %s success to reach an agreement", node.address.String())
}
doneCnt++
break
Expand Down

0 comments on commit 95b8b6f

Please sign in to comment.