2021-06-21 14:20:29 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import os
|
|
|
|
import signal
|
2024-09-27 10:19:39 +00:00
|
|
|
import sys
|
2021-06-21 14:20:29 +00:00
|
|
|
|
|
|
|
CURDIR = os.path.dirname(os.path.realpath(__file__))
|
|
|
|
sys.path.insert(0, os.path.join(CURDIR, "helpers"))
|
|
|
|
|
2024-09-27 10:19:39 +00:00
|
|
|
from client import client, end_of_block, prompt
|
2021-06-21 14:20:29 +00:00
|
|
|
|
|
|
|
log = None
|
|
|
|
# uncomment the line below for debugging
|
|
|
|
# log=sys.stdout
|
|
|
|
|
2021-06-22 15:56:47 +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")
|
2024-06-05 07:50:39 +00:00
|
|
|
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)
|