camel-kafka-connector icon indicating copy to clipboard operation
camel-kafka-connector copied to clipboard

Use the deliverable artifact in the plugin.path during testing

Open orpiske opened this issue 5 years ago • 3 comments

The plugin.path configured in the connect runtime uses either the path of the packaged jar or the compiled classes.

There is one circumstance where this is less than ideal: when the jar file is used to determine the path, the compiled class files will also be present. Therefore, the behavior is not entirely deterministic and could lead to subtle bugs during test execution (in case there are circumstances modifying how the connect runtime determines what to load).

Some possible solutions:

  • remove the compiled classes prior to the verify target
  • copy the jar file to a different/temporary location and use that in the plugin path
  • extract the package to a temporary location prior to the test, and use its location in the plugin path (also adjusting the test dependencies to provided scope).

orpiske avatar May 05 '20 16:05 orpiske

c/c: @valdar

The risk we were discussing today.

orpiske avatar May 05 '20 16:05 orpiske

@orpiske where do we stand in your opinion about this?

valdar avatar Apr 02 '21 12:04 valdar

So, I think the only way we could do something like this is by testing it outside of the build (as in a by a separate test framework). Although the risk do exist, we haven't come across it in since the project beginning. Therefore, I think we can close this as 'won't fix'.

orpiske avatar Apr 06 '21 07:04 orpiske