Skip to content

Commit

Permalink
Simulate broker crash
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitrii Petukhov <[email protected]>
  • Loading branch information
bbpetukhov committed Dec 7, 2024
1 parent 4a21edb commit cf2de2e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
- name: Upload broker core dump as artifacts
# if: failure()
if: always()
uses: actions/upload-artifact@v4
with:
name: core_dumps
Expand All @@ -105,11 +106,13 @@ jobs:

- name: Compress collected broker logs
# if: failure()
if: always()
working-directory: /tmp/bmq-broker
run: tar -zcvf broker_logs.tar.gz /tmp/bmq-broker/bmq-broker-java-it*

- name: Upload broker logs as artifacts
# if: failure()
if: always()
uses: actions/upload-artifact@v3
with:
name: broker_logs_${{ matrix.java }}
Expand Down
13 changes: 10 additions & 3 deletions bmq-sdk/src/test/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ RUN mkdir -p /tmp/cores
COPY config/ /etc/local/bmq/

EXPOSE 30114

RUN echo "/usr/local/bin/bmqbrkr /etc/local/bmq &" > /tmp/startup.sh
RUN echo "BROKER_PID=$!" >> /tmp/startup.sh
RUN echo "sleep 30" >> /tmp/startup.sh
RUN echo "kill -QUIT $BROKER_PID" >> /tmp/startup.sh
RUN chmod +x /tmp/startup.sh
CMD ["/tmp/startup.sh"]

CMD [ "/usr/local/bin/bmqbrkr" \
, "/etc/local/bmq" \
]
# CMD [ "/usr/local/bin/bmqbrkr" \
# , "/etc/local/bmq" \
# ]

0 comments on commit cf2de2e

Please sign in to comment.