BewareMyPower commented on a change in pull request #10309:
URL: https://github.com/apache/pulsar/pull/10309#discussion_r683626563
##########
File path: pulsar-client-cpp/docker-tests.sh
##########
@@ -58,4 +60,26 @@ done
# Start 2 Pulsar standalone instances (one with TLS and one without)
# and execute the tests
-$DOCKER_CMD bash -c "cd /pulsar/pulsar-client-cpp && ./run-unit-tests.sh
${tests}"
+set +e
+DISABLE_COLOR_OUTPUT=""
+if [ "$GTEST_COLOR" = "no" ]; then
+ DISABLE_COLOR_OUTPUT="| cat"
+fi
+$DOCKER_CMD bash -c "cd /pulsar/pulsar-client-cpp && ./run-unit-tests.sh
${tests} $DISABLE_COLOR_OUTPUT"
Review comment:
The real cause of broken CI is here. `DISABLE_COLOR_OUTPUT` is `| cat`
by default, then the command becomes
```bash
$DOCKER_CMD bash -c "cd /pulsar/pulsar-client-cpp && ./run-unit-tests.sh
${tests} | cat"
```
The exit code is what `cat` exits, so it's always 0. However, if you changed
it to
```bash
$DOCKER_CMD bash -c "cd /pulsar/pulsar-client-cpp && ./run-unit-tests.sh
${tests}"
```
The exit code would become 1, which is what `./run-unit-tests.sh` exits.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]