2021-06-21 14:20:29 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
import signal
|
|
|
|
|
|
|
|
CURDIR = os.path.dirname(os.path.realpath(__file__))
|
2022-03-22 16:39:58 +00:00
|
|
|
sys.path.insert(0, os.path.join(CURDIR, "helpers"))
|
2021-06-21 14:20:29 +00:00
|
|
|
|
|
|
|
from client import client, prompt, end_of_block
|
|
|
|
|
|
|
|
log = None
|
|
|
|
# uncomment the line below for debugging
|
2022-03-22 16:39:58 +00:00
|
|
|
# log=sys.stdout
|
2021-06-21 14:20:29 +00:00
|
|
|
|
2022-03-22 16:39:58 +00:00
|
|
|
with client(name="client1>", log=log) as client1:
|
2021-06-21 14:20:29 +00:00
|
|
|
client1.expect(prompt)
|
2023-06-29 12:08:08 +00:00
|
|
|
client1.send("SELECT number FROM numbers(1000) FORMAT Null")
|
|
|
|
client1.expect("Progress: 1\.00 thousand rows, 8\.00 KB .*" + end_of_block)
|
|
|
|
client1.expect("0 rows in set. Elapsed: [\\w]{1}\.[\\w]{3} sec.")
|
2023-08-03 02:45:37 +00:00
|
|
|
client1.expect("Peak memory usage: .*B" + end_of_block)
|