[expect] refactor common functions (#5634)

* unify node creating and destroying
* simplify switching between nodes
This commit is contained in:
Yakun Xu
2020-10-12 08:21:48 -07:00
committed by GitHub
parent c8ba04702c
commit 9e3b450218
42 changed files with 196 additions and 201 deletions
+3 -3
View File
@@ -29,10 +29,10 @@
source "tests/scripts/expect/_common.exp"
set spawn_id [spawn_node 1]
spawn_node 1
send "log level\n"
expect "1"
expect -re {\d}
expect "Done"
send "log level 5\n"
expect "Done"
@@ -48,4 +48,4 @@ expect "Error 7: InvalidArgs"
send "log level 1 2\n"
expect "Error 7: InvalidArgs"
dispose
dispose_all