From eee0dff2601fa515518eb313fd630532c7fbd59a Mon Sep 17 00:00:00 2001 From: pingke Date: Thu, 1 Aug 2024 23:51:57 +0800 Subject: [PATCH] bug fix --- .github/workflows/integration-test.yml | 14 +++++++------- cmd/integration-test-server/main.go | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index e0673cea..7f4a9245 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -40,9 +40,9 @@ jobs: run: | cd ../es-node make - ./run-l2-it-rpc.sh >> es-node-it-bootnode.log& + ./run-l2-it-rpc.sh > es-node-it-bootnode.log& - - name: Upload blobs + - name: Upload Blobs run: | cd ../ethstorage-sdk git checkout main @@ -52,9 +52,9 @@ jobs: node it.js - name: Test - run: | - cd ../es-node/cmd/integration-test-server + run: | + cd ../es-node + env ES_NODE_STORAGE_MINER=0x5C935469C5592Aeeac3372e922d9bCEabDF8830d ES_NODE_SIGNER_PRIVATE_KEY=e690c916d02b6f3ad4bb70cc2663389ea88a79ded45613b1bd5545961d063258 ./run-l2-it.sh > es-node-it.log& + cd /cmd/integration-test-server go build - ./integration-test-server > itserver.log& - cd ../.. - env ES_NODE_STORAGE_MINER=0x5C935469C5592Aeeac3372e922d9bCEabDF8830d ES_NODE_SIGNER_PRIVATE_KEY=e690c916d02b6f3ad4bb70cc2663389ea88a79ded45613b1bd5545961d063258 ./run-l2-it.sh >> es-node-it.log + ./integration-test-server > itserver.log diff --git a/cmd/integration-test-server/main.go b/cmd/integration-test-server/main.go index 290366b2..83d47f37 100644 --- a/cmd/integration-test-server/main.go +++ b/cmd/integration-test-server/main.go @@ -97,7 +97,7 @@ func checkState(oldState, newState *node.NodeState) { } check = true if shardState.SyncState.PeerCount <= 0 { - addErrorMessage(fmt.Sprintf("es-node peer count should larger than 0, peers: %d", shardState.SyncState.PeerCount)) + addErrorMessage("es-node peer count should larger than 0") } if oldShardState.SyncState.SyncProgress < 10000 && @@ -120,7 +120,7 @@ func checkState(oldState, newState *node.NodeState) { addErrorMessage("Mining should be start after sync done.") } } - if check { + if !check { addErrorMessage(fmt.Sprintf("Shard %d in the new state do not exist in the old state", shardState.ShardId)) } } @@ -162,7 +162,7 @@ func checkFinalState(state *node.NodeState) { func addErrorMessage(errMessage string) { log.Warn("Add error message", "msg", errMessage) - errorMessages = append(errorMessages, errMessage) + errorMessages = append(errorMessages, errMessage+"\n") } func listenAndServe(port int) error {