Skip to content

Switch junit to test scope#409

Merged
sceiler merged 1 commit intosaucelabs:masterfrom
timja:switch-junit
Aug 16, 2023
Merged

Switch junit to test scope#409
sceiler merged 1 commit intosaucelabs:masterfrom
timja:switch-junit

Conversation

@timja
Copy link
Copy Markdown
Contributor

@timja timja commented Aug 16, 2023

Description

I was surprised when I updated this library in jenkinsci/sauce-ondemand-plugin#118 to get a conflict with junit versions. I assume this is an accident

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (change which improves current code base; please describe the change)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Screenshots (if appropriate):

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • All new and existing tests passed locally
  • I have added necessary documentation (if appropriate)

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Copy link
Copy Markdown
Contributor

@sceiler sceiler left a comment

Choose a reason for hiding this comment

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

lgtm

@sceiler sceiler merged commit 46abb01 into saucelabs:master Aug 16, 2023
@timja timja deleted the switch-junit branch August 16, 2023 10:44
@sceiler
Copy link
Copy Markdown
Contributor

sceiler commented Aug 16, 2023

I have rolled this back. Both dependencies are required in the main project and setting it to test scope will break other code. Try it yourself and you will see compiler errors.

@timja
Copy link
Copy Markdown
Contributor Author

timja commented Aug 16, 2023

I see there's a junit extension in this library.

I tried to switch it to the API only but there's something using an internal extension from the engine as well.

import org.junit.jupiter.engine.execution.BeforeEachMethodAdapter;
import org.junit.jupiter.engine.extension.ExtensionRegistry;

Bit surprising

@sceiler
Copy link
Copy Markdown
Contributor

sceiler commented Aug 16, 2023

iirc I added this because JUnit 5 had some limitations in regards of parameter resolution in test cases.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants