917 Commits

Author SHA1 Message Date
Eric
72e687f828
fix rebase on top of async http client change 2025-06-04 15:58:31 +10:00
Eric
5371aa2c7c
Remove debug from twonodesconfig 2025-06-04 15:58:30 +10:00
Eric
1f859b24fe
Add wait to stdout/stderr stream future 2025-06-04 15:58:30 +10:00
Eric
061ccce403
fix windows issue where reading stdout/stderr hangs forever 2025-06-04 15:58:30 +10:00
Eric
06337a0512
ensure runTests doesn't raise CancelledError
TrackedFutures now only accepts Futures that do not raise any exceptions
2025-06-04 15:58:30 +10:00
Eric
d2734a686e
Remove DebugCodexNodes
- Codex nodes will log to file by default, so this parameter could be removed.
- Add NoCodexLogFilters define, that unsets chronicles' topic filters when logging codex nodes chronicles logs to file
2025-06-04 15:58:30 +10:00
Eric
05ec9e6b9c
do not re-raise CancelledError as convertError not used in async procs 2025-06-04 15:58:30 +10:00
Eric
324035ed27
re-raise CancelledError 2025-06-04 15:58:29 +10:00
Eric
e69319b5a2
readd prevention of hanging when closing process streams on windows 2025-06-04 15:58:29 +10:00
Eric
ee0d2866c8
Add debugging and assertions after test run
Mostly to debug in windows
2025-06-04 15:58:29 +10:00
Eric
bf13173e58
CI yml fix for gcc-14 2025-06-04 15:58:29 +10:00
Eric
8e6eca6bc0
Update NBS action.yml in CI 2025-06-04 15:58:28 +10:00
Eric
18e9dc3529
formatting 2025-06-04 15:56:04 +10:00
Eric
e2706a68b3
formatting 2025-06-04 15:56:04 +10:00
Eric
701421c26c
Fix process hanging after restart 2025-06-04 15:56:03 +10:00
Eric
5ff15da492
refactor: debug and logging
- Move test manager values to config object
- Increase codex port separation (between api and disc ports) in an attempt to prevent overlap across tests (ie Test1: api=8000(tcp), disc=9000(udp), and Test2: api=9000(tcp), disc=10000(udp))
- print stderr when exitcode == 1 if there's < 3 lines of stdout
- Logging:
  - Always write test manager harness chronicles logs to file, ie testmanager.chronicles.log in the root of the `integration/logs/<run name>` dir
  - Always write individual test stdout to file, ie `<test file name>.stdout.log` in the root of the `integration/logs/<run name>/<test file name>` dir
  - On error, print stderr to screen and write stderr to file. Or on failure, if stdout is sufficiently short, write stderr to screen and file in `integration/logs/<run name>/<test file name>/<test file name>.stderr.log`
  - When debugging, ie DebugCodexNodes == true
- Removes DebugTestHarness from controlling anything other than printing chronicles output from the testmanager to the terminal
- Now, if DebugCodexNodes is set to true:
  - Codex node (chronicles) output for multinodesuite tests is logged to file, eg `integration/logs/<run name>/<test file name>/<test name>/<role>_<idx>.log`
  - Codex chronicles output is logged to stdout, which also written to file (see above)
2025-06-04 15:56:03 +10:00
Eric
831ad9170b
enable more logging to file
- test harness chronicles logs to log file
- test process stdout and stderr to log file for each integration test file

Note: does not work when DEBUG=1 is not present in make command
2025-06-04 15:56:03 +10:00
Eric
8f21cacc79
Ensure started tests are torn down properly on timeout 2025-06-04 15:56:03 +10:00
Eric
aacf22a1a0
filter out log topics that are making too much noise
- set disabled topics during codex compilation due to lack of support for disabling chronicles topics at runtime in codex
- ensure that TRACE logs are set for nodes running in multinodesuite when DebugCodexNodes is set
- add TRACE loglevel to testcli
2025-06-04 15:56:03 +10:00
Slava
e0b222a10c
ci: check runner for parallel integration tests and use value from vars 2025-06-04 15:56:02 +10:00
Eric
1051e464e0
Colorise stdout from test runs
Adds terminal colour to [OK], [FAILED], and [Suite]

# Conflicts:
#	tests/integration/testmanager.nim
2025-06-04 15:55:18 +10:00
Eric
ca62539e9c
Refactor process launch
Refactor to keep a process handle so that the processes can be stopped on timeout.
2025-06-04 15:55:17 +10:00
Eric
0309cfd063
run tests async from start so that stop can cancel all tracked futures 2025-06-04 15:55:17 +10:00
Eric
bd68388d2a
Add proper async exception tracking to multinodesuite 2025-06-04 15:55:17 +10:00
Eric
faaddb879b
bump chronos to 4.0.4
potentially fixes an issue on macos where process exit codes were reported -1
2025-06-04 15:55:17 +10:00
Eric
c1f0888096
formatting 2025-06-04 15:55:17 +10:00
Eric
58153ee921
CI: enable artefact upload for parallel tests 2025-06-04 15:55:16 +10:00
Eric
865403d877
run npm install for parallel tests in ci 2025-06-04 15:55:16 +10:00
Eric
b6b595aab5
Allow debug runs from the github UI 2025-06-04 15:55:16 +10:00
Eric
fc63ee188e
clean up 2025-06-04 15:55:16 +10:00
Eric
9cd9f5e29f
increase port gap by 1000 to avoid clashes in windows 2025-06-04 15:55:16 +10:00
Eric
c51103165b
lock codex port selection in multinodesuites
Codex api/disc ports were clashing in windows because `lastUsedCodexApiPort` and `lastUsedCodeexDiscPort` were not locked when read and written, while client and provider nodes were started concurrently (async).
2025-06-04 15:55:16 +10:00
Eric
9ac24ff2fa
add test name to datadir path
avoids reusing datadirs between tests
2025-06-04 15:55:15 +10:00
Eric
c196920d20
update Make flag to simply debug
DEBUG -> enables DebugCodexNodes, DebugTestHarness, and ShowContinuousStatusUpdates
DEBUG_HARDHAT -> enables DebugHardhat
PARALLEL -> enables EnableParallelTests

Additionally, when DEBUG is enabled, all integration tests debug configs are enabled for Codex nodes, the Codex node output is printed with the test output (not interleaved), and the Codex node output is logged to file in `tests/integrations/logs/<starttime>__IntegrationTests/<integration_test_name>/<suite_name>/<testname>/<role>_<idx>.log`.
When DEBUG_HARDHAT is enabled, all hardhat output is printed with the test output (not interleaved), and the output is also written to a log file in `tests/integrations/logs/<starttime>__IntegrationTests/<integration_test_name>/hardhat.log
2025-06-04 15:55:15 +10:00
Eric
405eb370b3
cancel processes soon
Windows really does not like to terminate processes, so if we try to cancel the process, we will hang in Windows.
2025-06-04 15:54:29 +10:00
Eric
eb50409356
fix: hardhot not being stopped when test times out 2025-06-04 15:54:29 +10:00
Eric
43fd465ec9
Allow parallel integration tests to be disabled
Disable with `make ENABLE_PARALLEL_TESTS=0 testIntegration`
2025-06-04 15:54:28 +10:00
Eric
055744a0c7
fix: use the last used port instead of the globally defined port 2025-06-04 15:54:28 +10:00
Eric
9f83213757
Increase hardhat, codex api, and codex discovery ports for each subsequent test
Previously, each test would start with a port specified by a global const and overwritable using `define` cli flag. This seems to be causing some port clashes that `nextFreePort` is not picking up. Instead of relying on `nextFreePort`, do not reuse port numbers for any of the tests.
2025-06-04 15:54:28 +10:00
Eric
b1fe15f6ac
enable debug logs for testpurchasing since the failure in ci 2025-06-04 15:54:28 +10:00
Eric
f278d11b70
swap linux large runner 2025-06-04 15:54:28 +10:00
Eric
9cc5baef09
fix waiting for hardhat node process exit on windows 2025-06-04 15:54:28 +10:00
Eric
6d9cac3892
handle cancellations for race and allFutures 2025-06-04 15:54:27 +10:00
Eric
5ddccb6523
fix hardhat running on windows
Solution was two-fold:
1. Run the hardhat.cmd script instead of hardhat
2. Use the absolute path to the script executable instead of relative to the working directory
2025-06-04 15:54:27 +10:00
Eric
bf3775270a
Bubble errors from hardhat start
- bubble errors from hardhatprocess.start (instead of just logging)
- push raises: [] in all nodeprocess procs/methods to avoid leaking `Exception` exception types in method overrides
2025-06-04 15:54:27 +10:00
Eric
69b9bb0030
re-add windows to CI 2025-06-04 15:54:27 +10:00
Eric
09ccdfaa2b
nil check hardhat process before stopping 2025-06-04 15:54:27 +10:00
Eric
809558e9a7
fix exit status 2025-06-04 15:54:26 +10:00
Eric
5dea609386
use macos-14-large
windows is failing with SIGSEGV so remove it for now
2025-06-04 15:54:26 +10:00
Eric
951da79a4e
add windows large runner 32vcpu 2025-06-04 15:54:26 +10:00