Skip to content

[ADDED] MQTT: test/bench using external client #2

[ADDED] MQTT: test/bench using external client

[ADDED] MQTT: test/bench using external client #2

Workflow file for this run

name: MQTT-ext
on: [push, pull_request]
jobs:
test:
env:
GOPATH: /home/runner/work/nats-server
GO111MODULE: "on"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: src/github.com/nats-io/nats-server
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Install external test tools
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
wget https://github.com/hivemq/mqtt-cli/releases/download/v4.20.0/mqtt-cli-4.20.0.deb
sudo apt install ./mqtt-cli-4.20.0.deb
- name: Run 'mqtt test'
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
cd src/github.com/nats-io/nats-server
go test -v -vet=off --run=TestMQTTEx ./server
bench:
strategy:
matrix:
mode: [Cluster, Server]
env:
GOPATH: /home/runner/work/nats-server
GO111MODULE: "on"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: src/github.com/nats-io/nats-server
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Install external test tools
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
# <>/<> FIXME: use @latest
go install github.com/ConnectEverything/mqtt-test@36762e7b1c50335f56d9560dda218115e7b475c6
- name: Run benchmarks
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
cd src/github.com/nats-io/nats-server
pwd
go test --run=- --bench 'MQTTEx/${{ matrix.mode }}' --benchtime=100x ./server | tee /tmp/current-bench-result.txt