diff --git a/core/blockchain_diff_test.go b/core/blockchain_diff_test.go index 0b289bdc1c..d2d22bef6e 100644 --- a/core/blockchain_diff_test.go +++ b/core/blockchain_diff_test.go @@ -282,8 +282,9 @@ func TestFreezeDiffLayer(t *testing.T) { defer fullBackend.close() // Minus one empty block. if fullBackend.chain.diffQueue.Size() != blockNum-1 { - t.Errorf("size of diff queue is wrong, expected: %d, get: %d", blockNum, fullBackend.chain.diffQueue.Size()) + t.Errorf("size of diff queue is wrong, expected: %d, get: %d", blockNum-1, fullBackend.chain.diffQueue.Size()) } + time.Sleep(diffLayerFreezerRecheckInterval + 1*time.Second) if fullBackend.chain.diffQueue.Size() != int(fullBackend.chain.triesInMemory) { t.Errorf("size of diff queue is wrong, expected: %d, get: %d", blockNum, fullBackend.chain.diffQueue.Size())