343 Commits

Author SHA1 Message Date
Eric
fc41c08d74
Remove marketplace example dist test clone
No longer needed and the unit tests checking expiry < duration in other modules and on the contracts should cover this case.
2023-12-06 16:19:18 +11:00
Eric
d6c20e8b5d
Clone and fix MarketplaceExample dist test
The main issue was caused by an underflow in the partial payouts calculation. The underflow has been fixed.

The rest is creation of the test and supporting changes for the test.
2023-12-06 15:42:19 +11:00
Eric
3e4a585fa6
move marketplace test to its own file 2023-12-06 15:41:52 +11:00
Eric
ec5cf2ad96
terminate process before waiting for exit with timeout
solved an issue on windows where the processes were not exiting cleanly and causing an attempted write to the dht db after the data dir had already been deleted
2023-12-06 15:41:18 +11:00
Eric
cccec6574c
fixes to get hardhat process launching at the test-level
- removed ethersuite as the base testing suite for multinodesuite because the need to launch hardhat before ethersuite setup and kill hardhat after ethersuite teardown was required. Removing ethersuite allowed for checking if a connection to hardhat was established. If no connection established, hardhat would need to be started via the test config. If there was a connection established, a snapshot is taken during test setup and reverted during teardown.
- modified the way the hardhat process was launched, because evaluating a command using chronos startProcess would wait for the command to complete before access to the output stream was given. Instead, we now launch the hardhat executable from node_modules/.bin/hardhat.
- modify the way the processes are exited by killing them immediately.
- fix warnings
2023-12-06 15:41:18 +11:00
Eric
109f9461b3
small fixes to get all tests building
ALL TESTS PASSING when hardhat is already running
2023-12-06 15:41:18 +11:00
Eric
fa8f5148b2
Refactor to use CodexProcess/CodexConfig and HardhatProcess/HardhatConfig
Test work as long as hardhat is already running. Hardhat config needs to be moved back to suite-level
2023-12-06 15:41:18 +11:00
Eric
47e4783b14
line endings in windows are normalized for chronos output 2023-12-06 15:41:18 +11:00
Eric
075e89de2b
get next free port instead of waiting for ports to close 2023-12-06 15:41:18 +11:00
Eric
428f6d68fb
switch to using chronos process handling
- chronos startProcess starts a process and uses an AsyncStream for output which allows us to consume when needed and not needed
2023-12-06 15:41:18 +11:00
Eric
8997573d60
force output to parent streams in windows 2023-12-06 15:41:18 +11:00
Eric
a7f33bf15f
debugging windows integration tests
- Use rest api check to determine when node started
- Use poInteractive and poStdErrToStdOut process start options in the hopes it may help with the small windows buffers
2023-12-06 15:41:18 +11:00
Eric
93c1b30a98
debugging in ci, *commit previous passed all but macos
reduce period advancement speed in windows
2023-12-06 15:41:18 +11:00
Eric
bb010791e3
debugging in ci
add .debug() to all validators
2023-12-06 15:41:18 +11:00
Eric
218b7849e3
debugging in ci
try commenting out first marketplacesuite test in testproofs so there's only one in that file
2023-12-06 15:41:18 +11:00
Eric
b6d2f0433e
debugging in ci
try extending expiry by 6 periods
2023-12-06 15:41:18 +11:00
Eric
836a4cc067
debugging in ci
- Add additional logging to purchasing
- remove chronicles logging from multinodes
- enable log topics in the integration test of interest
2023-12-06 15:41:18 +11:00
Eric
e6d025ca5b
cleanup after rebase 2023-12-06 15:41:17 +11:00
Eric
8df351d917
extra debug 2023-12-06 15:40:47 +11:00
Eric
f1f9d7a825
debugging in ci
enable writing to log file
2023-12-06 15:40:47 +11:00
Eric
d3c07cf1d4
debugging in ci
set all debug modes to true, to write to stdout, otherwise seems to "freeze"
2023-12-06 15:40:47 +11:00
Eric
c48e3d6d93
debugging in ci 2023-12-06 15:40:47 +11:00
Eric
43fc6bd7b8
debugging in ci 2023-12-06 15:40:47 +11:00
Eric
83d36c06fc
debugging in ci 2023-12-06 15:40:47 +11:00
Eric
18640e339b
debugging in ci 2023-12-06 15:40:47 +11:00
Eric
1cc5f21da0
debugging in ci 2023-12-06 15:40:47 +11:00
Eric
3d186dd0a5
debugging in ci 2023-12-06 15:40:47 +11:00
Eric
48ab78da3b
debugging in ci 2023-12-06 15:40:47 +11:00
Eric
4524a609a4
debugging on ci 2023-12-06 15:40:47 +11:00
Eric
6b1e0b0f38
attempt to fix windows ci not starting codex fast enough 2023-12-06 15:40:47 +11:00
Eric
424d6fb560
add back import needed in linux CI 2023-12-06 15:40:47 +11:00
Eric
30e8071681
clean up warnings 2023-12-06 15:40:47 +11:00
Eric
c1e5d0e9c2
cleanup imports after rebase, fix toJson 2023-12-06 15:40:47 +11:00
Eric
c19a94ddc1
move node config from suite-level to test-level 2023-12-06 15:40:47 +11:00
Eric
ec4f5c015f
clean up unused import warnings 2023-12-06 15:40:47 +11:00
Eric
c9b6bfb2a7
clean up 2023-12-06 15:40:47 +11:00
Eric
f95fa0a97c
fix partial payout integration test
In proving.onCancelled, the `waitFor state.loop.cancelAndWait()` was never completing. Turns out this was not needed, because when changing states, the current state's run is cancelled, which automatically cancels the state prove loop, because it is a child of proving.run. Therefore, the logic to cancelAndWait the prove loop was removed as it was not needed.
2023-12-06 15:40:46 +11:00
Eric
cbd357e830
clean up 2023-12-06 15:39:08 +11:00
Eric
e762860e6b
speed up tests
- advance to next period and mine every 500ms
- update eventually checks in tests to check for number of periods, not time
- change log file format to include test name
2023-12-06 15:39:08 +11:00
Eric
045f770128
All tests working, with no time advancement
- works with hardhat already running
- works with ethersuite to revert snapshot (ethProvider instead of provider)
- OnChainClock.now() gets latest block timestamp
2023-12-06 15:39:08 +11:00
Eric
3d9eb19855
All integration tests working 2023-12-06 15:39:08 +11:00
Eric
ca4181fe00
WIP proofs tests 2023-12-06 15:39:08 +11:00
Eric
93f9dbba08
WIP getting integration tests to work with marketplacesuite 2023-12-06 15:39:08 +11:00
Eric
eda4a85c3e
DRYing, renaming 2023-12-06 15:39:08 +11:00
Eric
935929461f
fix hardhat stop
- allow multiple multinode suites in one module
- remove need to rely on npmstart script, use eval command instead
- properly override stop method to shutdown hardhat node
2023-12-06 15:39:08 +11:00
Eric
4dffb643a4
comment out other integration tests for now 2023-12-06 15:39:08 +11:00
Eric
3964f868f5
Remove cancelTransaction, add period cadence to testproofs 2023-12-06 15:39:08 +11:00
Eric
bc0652aeb6
Get balance for each provider, bump ethers 2023-12-06 15:39:08 +11:00
Eric
10decd2f28
allow integration tests to start hardhat locally so logs can be captured 2023-12-06 15:39:08 +11:00
Eric
40ee931d6d
remove cancellation of txs in market, handled by ethers now 2023-12-06 15:39:08 +11:00