From 3425c530a784c31b99c8f992f42ace51c7eda569 Mon Sep 17 00:00:00 2001 From: Adam Cimarosti Date: Tue, 12 Mar 2024 15:23:20 +0000 Subject: [PATCH 1/3] split out tls proxy compile time on slower ci to separate step --- system_test/fixture.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/system_test/fixture.py b/system_test/fixture.py index bc5e7c1f..88e802dc 100644 --- a/system_test/fixture.py +++ b/system_test/fixture.py @@ -459,6 +459,19 @@ def start(self): env = dict(os.environ) env['CARGO_TARGET_DIR'] = str(self._target_dir) self._log_file = open(self._log_path, 'wb') + + # Compile before running `cargo run`. + # Note that errors and output are purpously suppressed. + # This is just to exclude the build time from the start-up time. + # If there are build errors, they'll be reported later in the `run` + # call below. + subprocess.call( + ['cargo', 'build'], + cwd=self._code_dir, + env=env, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL) + self._proc = subprocess.Popen( ['cargo', 'run', str(self.qdb_ilp_port)], cwd=self._code_dir, From 07a3c418e94f457f7b5aacd4389d2227c4b87155 Mon Sep 17 00:00:00 2001 From: Adam Cimarosti Date: Tue, 12 Mar 2024 15:53:24 +0000 Subject: [PATCH 2/3] fix manifest yaml --- examples.manifest.yaml | 36 ++++++++++++++++++------------------ system_test/test.py | 8 ++++++++ 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/examples.manifest.yaml b/examples.manifest.yaml index d8a91b4f..0e5a0beb 100644 --- a/examples.manifest.yaml +++ b/examples.manifest.yaml @@ -103,23 +103,23 @@ host: localhost port: 9009 - - name: ilp-from-conf - lang: c - path: examples/line_sender_c_example_from_conf.c - header: |- - [C client library docs](https://github.com/questdb/c-questdb-client/blob/main/doc/C.md) - conf: tcp::addr=localhost:9009; +- name: ilp-from-conf + lang: c + path: examples/line_sender_c_example_from_conf.c + header: |- + [C client library docs](https://github.com/questdb/c-questdb-client/blob/main/doc/C.md) + conf: tcp::addr=localhost:9009; - - name: ilp-from-conf - lang: cpp - path: examples/line_sender_cpp_example_from_conf.cpp - header: |- - [C client library docs](https://github.com/questdb/c-questdb-client/blob/main/doc/CPP.md) - conf: tcp::addr=localhost:9009; +- name: ilp-from-conf + lang: cpp + path: examples/line_sender_cpp_example_from_conf.cpp + header: |- + [C client library docs](https://github.com/questdb/c-questdb-client/blob/main/doc/CPP.md) + conf: tcp::addr=localhost:9009; - - name: ilp-from-conf - lang: rust - path: questdb-rs/examples/from_conf.rs - header: |- - [Rust client library docs](https://docs.rs/crate/questdb-rs/latest) - conf: tcp::addr=localhost:9009; +- name: ilp-from-conf + lang: rust + path: questdb-rs/examples/from_conf.rs + header: |- + [Rust client library docs](https://docs.rs/crate/questdb-rs/latest) + conf: tcp::addr=localhost:9009; diff --git a/system_test/test.py b/system_test/test.py index c57aab94..fdd627c1 100755 --- a/system_test/test.py +++ b/system_test/test.py @@ -752,6 +752,14 @@ def test_bad_env_var(self): with self.assertRaisesRegex(qls.SenderError, r'.*Environment variable QDB_CLIENT_CONF not set.*'): qls._error_wrapped_call(qls._DLL.line_sender_from_env) + def test_manifest_yaml(self): + # Check the manifest file can be read as yaml. + import yaml + proj = Project() + manifest_path = proj.root_dir / 'examples.manifest.yaml' + with open(manifest_path, 'r') as f: + yaml.safe_load(f) + def parse_args(): parser = argparse.ArgumentParser('Run system tests.') From 8406794a74fbfc8c354b4c9dc90b9dcb3d31610c Mon Sep 17 00:00:00 2001 From: Adam Cimarosti Date: Tue, 12 Mar 2024 16:02:14 +0000 Subject: [PATCH 3/3] support python versions without yaml --- system_test/test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system_test/test.py b/system_test/test.py index fdd627c1..9d90bac6 100755 --- a/system_test/test.py +++ b/system_test/test.py @@ -754,7 +754,10 @@ def test_bad_env_var(self): def test_manifest_yaml(self): # Check the manifest file can be read as yaml. - import yaml + try: + import yaml + except ImportError: + self.skipTest('Python version does not support yaml') proj = Project() manifest_path = proj.root_dir / 'examples.manifest.yaml' with open(manifest_path, 'r') as f: