You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use AWS Spot Instances as CI nodes, ensure that the termination signal is properly propagated down the script hierarchy.
85
+
86
+
```bash
87
+
#!/bin/bash
88
+
89
+
handle_signal() {
90
+
local signal=$1
91
+
if [[ -n$knapsack_pro_pid ]];then
92
+
echo"KNAPSACK_PRO_CI_NODE_INDEX=$KNAPSACK_PRO_CI_NODE_INDEX Received signal $signal in bin/parallel_tests, terminating the Knapsack Pro process with TERM"
93
+
kill -TERM $knapsack_pro_pid
94
+
echo"KNAPSACK_PRO_CI_NODE_INDEX=$KNAPSACK_PRO_CI_NODE_INDEX Waiting for the Knapsack Pro process with PID $knapsack_pro_pid to terminate"
95
+
wait$knapsack_pro_pid
96
+
fi
97
+
}
98
+
99
+
trap'handle_signal TERM' TERM
100
+
trap'handle_signal INT' INT
101
+
102
+
# The Knapsack Pro API sees 3 * 2 = 6 parallel nodes
This also applies if you are running parallel test processes on each CI node (see how to [integrate Knapsack Pro with `parallel_tests` here](parallel_tests.md)).
82
+
This also applies if you are running parallel test processes on each CI node (see how to [integrate Knapsack Pro with `parallel_tests` here](parallel_tests.mdx)).
83
83
84
84
<details>
85
85
<summary>For legacy versions of `knapsack_pro` older than 7.0, please click here.</summary>
@@ -111,7 +111,7 @@ You need to install the [`rspec_junit_formatter`](https://github.com/sj26/rspec_
This applies also if you are running parallel test processes on each CI node (see our page on to integrate Knapsack Pro with [`parallel_tests`](parallel_tests.md) for an example).
114
+
This applies also if you are running parallel test processes on each CI node (see our page on to integrate Knapsack Pro with [`parallel_tests`](parallel_tests.mdx) for an example).
This also applies if you are running parallel test processes on each CI node (see how to [integrate Knapsack Pro with `parallel_tests` here](parallel_tests.md)).
139
+
This also applies if you are running parallel test processes on each CI node (see how to [integrate Knapsack Pro with `parallel_tests` here](parallel_tests.mdx)).
140
140
141
141
<details>
142
142
<summary>For legacy versions of `knapsack_pro` older than 7.0, please click here.</summary>
@@ -168,7 +168,7 @@ You need to install the [`rspec_junit_formatter`](https://github.com/sj26/rspec_
This applies also if you are running parallel test processes on each CI node (see our page on to integrate Knapsack Pro with [`parallel_tests`](parallel_tests.md) for an example).
171
+
This applies also if you are running parallel test processes on each CI node (see our page on to integrate Knapsack Pro with [`parallel_tests`](parallel_tests.mdx) for an example).
0 commit comments