BlackZork / mqmgateway

MQTT gateway for modbus networks
GNU Affero General Public License v3.0
42 stars 18 forks source link

Prevent tests to fail in certain build environments #36

Closed git-developer closed 7 months ago

git-developer commented 7 months ago

This PR prevents tests to fail in certain build environments.

My CI Docker builds on GitHub run fine for Alpine base images and all archs amd64, i386, arm64, arm/v7, arm/v6. I recently added support for Debian base images and noticed that 1 single test fails reproduceably, but only on arch arm/v6. I first thought that adjusting MQM_TEST_TIMEOUT from 400ms could help, but it didn't for values up to 5000ms. Then I had a look at the test and found out that it uses a constant timeout. Changing this timeout from 4s to 5s fixes the problem.

I admit that the build enviromnent is quite special, but nevertheless it might be worth a fix.

See here for a broken build and here for a fixed one.