Skip to content

Commit a971a24

Browse files
authored
chore: minor fixes to examples manifest file and reduced python test flakyness (#55)
1 parent 0ce4cff commit a971a24

File tree

3 files changed

+42
-18
lines changed

3 files changed

+42
-18
lines changed

examples.manifest.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -103,23 +103,23 @@
103103
host: localhost
104104
port: 9009
105105

106-
- name: ilp-from-conf
107-
lang: c
108-
path: examples/line_sender_c_example_from_conf.c
109-
header: |-
110-
[C client library docs](https://github.com/questdb/c-questdb-client/blob/main/doc/C.md)
111-
conf: tcp::addr=localhost:9009;
106+
- name: ilp-from-conf
107+
lang: c
108+
path: examples/line_sender_c_example_from_conf.c
109+
header: |-
110+
[C client library docs](https://github.com/questdb/c-questdb-client/blob/main/doc/C.md)
111+
conf: tcp::addr=localhost:9009;
112112

113-
- name: ilp-from-conf
114-
lang: cpp
115-
path: examples/line_sender_cpp_example_from_conf.cpp
116-
header: |-
117-
[C client library docs](https://github.com/questdb/c-questdb-client/blob/main/doc/CPP.md)
118-
conf: tcp::addr=localhost:9009;
113+
- name: ilp-from-conf
114+
lang: cpp
115+
path: examples/line_sender_cpp_example_from_conf.cpp
116+
header: |-
117+
[C client library docs](https://github.com/questdb/c-questdb-client/blob/main/doc/CPP.md)
118+
conf: tcp::addr=localhost:9009;
119119

120-
- name: ilp-from-conf
121-
lang: rust
122-
path: questdb-rs/examples/from_conf.rs
123-
header: |-
124-
[Rust client library docs](https://docs.rs/crate/questdb-rs/latest)
125-
conf: tcp::addr=localhost:9009;
120+
- name: ilp-from-conf
121+
lang: rust
122+
path: questdb-rs/examples/from_conf.rs
123+
header: |-
124+
[Rust client library docs](https://docs.rs/crate/questdb-rs/latest)
125+
conf: tcp::addr=localhost:9009;

system_test/fixture.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,19 @@ def start(self):
459459
env = dict(os.environ)
460460
env['CARGO_TARGET_DIR'] = str(self._target_dir)
461461
self._log_file = open(self._log_path, 'wb')
462+
463+
# Compile before running `cargo run`.
464+
# Note that errors and output are purpously suppressed.
465+
# This is just to exclude the build time from the start-up time.
466+
# If there are build errors, they'll be reported later in the `run`
467+
# call below.
468+
subprocess.call(
469+
['cargo', 'build'],
470+
cwd=self._code_dir,
471+
env=env,
472+
stdout=subprocess.DEVNULL,
473+
stderr=subprocess.DEVNULL)
474+
462475
self._proc = subprocess.Popen(
463476
['cargo', 'run', str(self.qdb_ilp_port)],
464477
cwd=self._code_dir,

system_test/test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,17 @@ def test_bad_env_var(self):
752752
with self.assertRaisesRegex(qls.SenderError, r'.*Environment variable QDB_CLIENT_CONF not set.*'):
753753
qls._error_wrapped_call(qls._DLL.line_sender_from_env)
754754

755+
def test_manifest_yaml(self):
756+
# Check the manifest file can be read as yaml.
757+
try:
758+
import yaml
759+
except ImportError:
760+
self.skipTest('Python version does not support yaml')
761+
proj = Project()
762+
manifest_path = proj.root_dir / 'examples.manifest.yaml'
763+
with open(manifest_path, 'r') as f:
764+
yaml.safe_load(f)
765+
755766

756767
def parse_args():
757768
parser = argparse.ArgumentParser('Run system tests.')

0 commit comments

Comments
 (0)