-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add defaults * Add latest block methods * Address comments * lint * Fix lint overflow issues * Update transaction_sender.go * Fix lint * Validate node config * Update toml.go * Add SendOnly nodes * Use pointers on config * Add test outlines * Use test context * Use configured selection mode * Set defaults * lint * Add nil check * Add client test * Add subscription test * tidy * Fix imports * Update chain_test.go * Update multinode.go * Add comments * Update multinode.go * Wrap multinode config * Fix imports * Update .golangci.yml * Use MultiNode * Add multinode to txm * Use MultiNode * Update chain.go * Update balance_test.go * Add retries * Fix head * Update client.go * lint * lint * Use MultiNode TxSender * Update txm_internal_test.go * Address comments * Remove total difficulty * Register polling subs * Extract MultiNodeClient * Remove caching changes * Undo cache changes * Fix tests * Update chain.go * Fix variables * Move classify errors * Fix imports * lint * Update txm_internal_test.go * Update txm_internal_test.go * lint * Fix error classification * Update txm_internal_test.go * Update multinode_client.go * lint * Update classify_errors.go * Update classify_errors.go * Add tests * Add test coverage * lint * Add dial comment * CTF bump for image build * Update pkg/solana/client/multinode_client.go Co-authored-by: Dmytro Haidashenko <[email protected]> * Update txm.go * Create loader * Update transaction_sender.go * Fix tests * Update txm_internal_test.go * lint * Update txm.go * Add ctx * Fix imports * Add SendTxResult to TxSender * Update chain_test.go * Enable MultiNode * Move error classification * Add MultiNode config * Use loader * Update multinode.go * Update multinode.go * Use loader in txm tests * lint * Update testconfig.go * Update loader * Use single RPC * Fix tests * lint * Use default thresholds * Address comments * Update classify_errors.go * Update testconfig.go * Update errors * lint * Fix SendTransaction * Update chain.go * Update sendTx * Fix ctx issues * Enable multiple RPCs in soak tests * Update defaults for testing * Add health check tags * Increase sync threshold * Validate heads * Use latestChainInfo * Fix AliveLoop bug * Update configurations * Update transaction_sender.go * Get chain info * Update ctx * Update transaction_sender.go * Update transaction_sender.go * Increase tx timeout * Update transaction_sender.go * Update ctx * Add timer * Update transaction_sender.go * Update transaction_sender.go * Update testconfig.go * Fix ctx * Remove debug logging * Update run_soak_test.sh * lint * Add debugging logs * Fix ctx cancel * Fix ctx cancel * Fix DoAll ctx * Remove debugging logs * Remove logs * defer reportWg * Add result ctx logging * log on close * Update transaction_sender.go * add cancel func * Update transaction_sender.go * Update transaction_sender.go * Add ctx to reportSendTxAnomalies * Update comments * Fix comments * Address comments * lint * lint * Pass context * Update node_lifecycle.go * Use get reader function * Make rpcurls plural * Fix reader getters * lint * fix imports * Update transaction_sender.go * Remove TxError * Rename getReader * lint * Update chain_test.go * Update transmissions_cache.go * Update run_soak_test.sh * Fix deprecated method * Clean up getReader * Use AccountReader --------- Co-authored-by: Damjan Smickovski <[email protected]> Co-authored-by: Dmytro Haidashenko <[email protected]>
- Loading branch information
1 parent
65ae137
commit 8b8369c
Showing
24 changed files
with
332 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/bin/bash | ||
|
||
NODE_VERSION=18 | ||
|
||
cd ../smoke || exit | ||
|
||
echo "Switching to required Node.js version $NODE_VERSION..." | ||
export NVM_DIR="$HOME/.nvm" | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | ||
nvm use $NODE_VERSION | ||
|
||
echo "Initializing soak test..." | ||
terminated_by_script=false | ||
while IFS= read -r line; do | ||
echo "$line" | ||
# Check if the line contains the target string | ||
if echo "$line" | grep -q "ocr2:inspect:responses"; then | ||
# Send SIGINT (Ctrl+C) to the 'go test' process | ||
sudo pkill -INT -P $$ go 2>/dev/null | ||
terminated_by_script=true | ||
break | ||
fi | ||
done < <(sudo go test -timeout 24h -count=1 -run TestSolanaOCRV2Smoke/embedded -test.timeout 30m 2>&1) | ||
|
||
# Capture the PID of the background process | ||
READER_PID=$! | ||
|
||
# Start a background timer (sleeps for 15 minutes, then sends SIGALRM to the script) | ||
( sleep 900 && kill -s ALRM $$ ) & | ||
TIMER_PID=$! | ||
|
||
# Set a trap to catch the SIGALRM signal for timeout | ||
trap 'on_timeout' ALRM | ||
|
||
# Function to handle timeout | ||
on_timeout() { | ||
echo "Error: failed to start soak test: timeout exceeded (15 minutes)." | ||
# Send SIGINT to the 'go test' process | ||
pkill -INT -P $$ go 2>/dev/null | ||
# Clean up | ||
kill "$TIMER_PID" 2>/dev/null | ||
kill "$READER_PID" 2>/dev/null | ||
exit 1 | ||
} | ||
|
||
# Wait for the reader process to finish | ||
wait "$READER_PID" | ||
EXIT_STATUS=$? | ||
|
||
# Clean up: kill the timer process if it's still running | ||
kill "$TIMER_PID" 2>/dev/null | ||
|
||
if [ "$terminated_by_script" = true ]; then | ||
echo "Soak test started successfully" | ||
exit 0 | ||
else | ||
echo "Soak test failed to start" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.