itest: print num of blocks for debugging

This commit is contained in:
yyforyongyu
2024-10-26 03:29:12 +08:00
parent fe48e65f42
commit 2c27df6c30

View File

@ -106,6 +106,9 @@ func TestLightningNetworkDaemon(t *testing.T) {
// among all the test cases. // among all the test cases.
harnessTest.SetupStandbyNodes() harnessTest.SetupStandbyNodes()
// Get the current block height.
height := harnessTest.CurrentHeight()
// Run the subset of the test cases selected in this tranche. // Run the subset of the test cases selected in this tranche.
for idx, testCase := range testCases { for idx, testCase := range testCases {
testCase := testCase testCase := testCase
@ -151,9 +154,10 @@ func TestLightningNetworkDaemon(t *testing.T) {
} }
} }
height := harnessTest.CurrentHeight() //nolint:forbidigo
t.Logf("=========> tests finished for tranche: %v, tested %d "+ fmt.Printf("=========> tranche %v finished, tested %d cases, mined "+
"cases, end height: %d\n", trancheIndex, len(testCases), height) "blocks: %d\n", trancheIndex, len(testCases),
harnessTest.CurrentHeight()-height)
} }
// getTestCaseSplitTranche returns the sub slice of the test cases that should // getTestCaseSplitTranche returns the sub slice of the test cases that should