File tree Expand file tree Collapse file tree 2 files changed +32
-4
lines changed Expand file tree Collapse file tree 2 files changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -95,15 +95,15 @@ async def init(self):
95
95
await self .expect (
96
96
'Well done, you successfully initialized ThingsDB!!' , timeout = 5 )
97
97
98
- async def wait_join (self , secret : str ):
98
+ async def wait_join (self , secret : str , timeout : int = 5 ):
99
99
self .start (secret = secret )
100
100
await self .expect (
101
- 'start listening for node connections' , timeout = 5 )
101
+ 'start listening for node connections' , timeout = timeout )
102
102
103
- async def run (self ):
103
+ async def run (self , timeout : int = 5 ):
104
104
self .start ()
105
105
await self .expect (
106
- 'start listening for node connections' , timeout = 5 )
106
+ 'start listening for node connections' , timeout = timeout )
107
107
108
108
async def init_and_run (self ):
109
109
await self .init ()
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
import asyncio
3
3
import os
4
+ import logging
4
5
from lib import run_test
5
6
from lib import default_test_setup
6
7
from lib .testbase import TestBase
@@ -28,6 +29,14 @@ async def run(self):
28
29
if not fn .endswith ('.tar.gz' ):
29
30
continue
30
31
32
+ logging .warning (f"""
33
+ { '#' * 80 }
34
+
35
+ Next file: { fn }
36
+
37
+ { '#' * 80 }
38
+ """ )
39
+
31
40
fn = os .path .join (BACKUP_PATH , fn )
32
41
33
42
collections = await query ('collections_info();' )
@@ -40,6 +49,25 @@ async def run(self):
40
49
await asyncio .sleep (10 )
41
50
await client .authenticate ('admin' , 'pass' )
42
51
52
+ logging .warning (f"""
53
+ { '#' * 80 }
54
+
55
+ Imported file: { fn } , restart test...
56
+
57
+ { '#' * 80 }
58
+ """ )
59
+
60
+ await self .node0 .shutdown ()
61
+ await self .node0 .run (timeout = 20 )
62
+
63
+ logging .warning (f"""
64
+ { '#' * 80 }
65
+
66
+ Finished file: { fn }
67
+
68
+ { '#' * 80 }
69
+ """ )
70
+
43
71
client .close ()
44
72
await client .wait_closed ()
45
73
You can’t perform that action at this time.
0 commit comments