Currently, every integration test that collects traces starts an instance of MockServer and some of them fails because the server port is already bound.
To allow parallel execution, we should start the server only once per test suite, either by setting @MockServerExtension.perTestSuite=true on every test or by configuring the MockServer maven plugin.
In addition, we also need to make sure that tests only assert on traces produces by their own interaction, for example by filtering spans by vaadin.sessionId or vaadin.frontend.id attributes.
Note: the example MockServer maven plugin configuration binds the start goal to the process-test-classes, probably because it wants to use it also for unit tests. We can instead use the pre-intergration-test phase.
Currently, every integration test that collects traces starts an instance of MockServer and some of them fails because the server port is already bound.
To allow parallel execution, we should start the server only once per test suite, either by setting
@MockServerExtension.perTestSuite=true
on every test or by configuring the MockServer maven plugin. In addition, we also need to make sure that tests only assert on traces produces by their own interaction, for example by filtering spans byvaadin.sessionId
orvaadin.frontend.id
attributes.Note: the example MockServer maven plugin configuration binds the start goal to the
process-test-classes
, probably because it wants to use it also for unit tests. We can instead use thepre-intergration-test
phase.