File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ levels using the logger included in the test_framework, e.g.
145
145
` test_framework.log ` and no logs are output to the console.
146
146
- when run directly, * all* logs are written to ` test_framework.log ` and INFO
147
147
level and above are output to the console.
148
- - when run on Travis , no logs are output to the console. However, if a test
148
+ - when run by [ our CI (Continuous Integration) ] ( /ci/README.md ) , no logs are output to the console. However, if a test
149
149
fails, the ` test_framework.log ` and bitcoind ` debug.log ` s will all be dumped
150
150
to the console to help troubleshooting.
151
151
Original file line number Diff line number Diff line change @@ -51,10 +51,13 @@ don't have test cases for.
51
51
52
52
#### General test-writing advice
53
53
54
+ - Instead of inline comments or no test documentation at all, log the comments to the test log, e.g.
55
+ ` self.log.info('Create enough transactions to fill a block') ` . Logs make the test code easier to read and the test
56
+ logic easier [ to debug] ( /test/README.md#test-logging ) .
54
57
- Set ` self.num_nodes ` to the minimum number of nodes necessary for the test.
55
58
Having additional unrequired nodes adds to the execution time of the test as
56
59
well as memory/CPU/disk requirements (which is important when running tests in
57
- parallel or on Travis ).
60
+ parallel).
58
61
- Avoid stop-starting the nodes multiple times during the test if possible. A
59
62
stop-start takes several seconds, so doing it several times blows up the
60
63
runtime of the test.
You can’t perform that action at this time.
0 commit comments