Skip to content

117 fix test container setup#118

Open
DivineThreepwood wants to merge 8 commits intodevfrom
117-fix-test-container-setup
Open

117 fix test container setup#118
DivineThreepwood wants to merge 8 commits intodevfrom
117-fix-test-container-setup

Conversation

@DivineThreepwood
Copy link
Copy Markdown
Member

📜 Description

Changes proposed in this pull request:

  • Make sure mqtt test container is reused for all tests.
  • Upgrade test container dependency because it was no longer compatible with the latest docker version.

…iner is not restarted after each test, share mqtt docker test container between all tests.
import com.hivemq.client.mqtt.mqtt5.message.unsubscribe.Mqtt5UnsubscribeBuilder
import com.hivemq.client.mqtt.mqtt5.message.unsubscribe.unsuback.Mqtt5UnsubAck
import org.openbase.jul.communication.config.CommunicatorConfig
import org.openbase.jul.exception.tryOrNull
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imported but I don't see it used anywhere


private val scope = ScopeProcessor.generateScope("/test/integration")
private val config = CommunicatorConfig(brokerHost, brokerPort)
private val config get() = CommunicatorConfig(brokerHost!!, brokerPort!!)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add proper null handling


internal class SharedMqttClientTest : AbstractIntegrationTest() {

private val config get() = CommunicatorConfig(brokerHost!!, brokerPort!!)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

MountableFile.forHostPath(mosquittoConfig.toString()),
"/mosquitto/config/mosquitto.conf"
)
.apply { withStartupTimeout(Duration.ofSeconds(30)).start() }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic number. Please export to const

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I introduced a const, however, I am not sure if this really improved the readability of the code.

Comment on lines +14 to +54
## # available=5.10.3
## # available=5.10.4
## # available=5.10.5
## # available=5.11.0-M1
## # available=5.11.0-M2
## # available=5.11.0-RC1
## # available=5.11.0
## # available=5.11.1
## # available=5.11.2
## # available=5.11.3
## # available=5.11.4
## # available=5.12.0-M1
## # available=5.12.0-RC1
## # available=5.12.0-RC2
## # available=5.12.0
## # available=5.12.1
## # available=5.12.2
## # available=5.13.0-M1
## # available=5.13.0-M2
## # available=5.13.0-M3
## # available=5.13.0-RC1
## # available=5.13.0
## # available=5.13.1
## # available=5.13.2
## # available=5.13.3
## # available=5.13.4
## # available=5.14.0-RC1
## # available=5.14.0
## # available=5.14.1
## # available=5.14.2
## # available=5.14.3
## # available=6.0.0-M1
## # available=6.0.0-M2
## # available=6.0.0-RC1
## # available=6.0.0-RC2
## # available=6.0.0-RC3
## # available=6.0.0
## # available=6.0.1
## # available=6.0.2
## # available=6.0.3
## # available=6.1.0-M1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is managed by gradle (checkout readme). Its just listing all available updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix test container setup.

2 participants