Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix junit version #978

Closed
wants to merge 4 commits into from
Closed

Conversation

chris-ch
Copy link
Contributor

Along with junit version upgraded to 4.13 (gradle test was failing) and hamcrest updated to 3.0, added Codespace config for easier dev onboarding.

@@ -250,10 +250,10 @@ dependencies {
implementation "org.unbescape:unbescape:1.1.6.RELEASE"
implementation "org.slf4j:slf4j-api:1.7.25"

testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13'
Copy link
Contributor

Choose a reason for hiding this comment

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

Latest JUnit version is 4.13.2. Any particular reason you’re not updating to the latest version?

testImplementation "org.mockito:mockito-core:1.9.5"
testImplementation "org.hamcrest:hamcrest-library:1.3"
testImplementation "org.hamcrest:hamcrest-core:1.3"
testImplementation "org.hamcrest:hamcrest-library:3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Hamcrest isn’t being split up anymore. Both org.hamcrest:hamcrest-library and org.hamcrest:hamcrest-core are now basically empty JAR files that both depend on org.hamcrest:hamcrest in order to get Maven and Gradle to do the right thing. We should cut out the middleman here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, what branch did you base your pull request on? My gradle/verification-metadata.xml already contains keys for both hamcrest and JUnit…

Copy link
Contributor

Choose a reason for hiding this comment

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

Settings for your local IDE do not belong in version control.

Copy link
Contributor

Choose a reason for hiding this comment

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

This does not belong in this pull request.

Copy link
Contributor

Choose a reason for hiding this comment

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

This also looks quite unrelated. Please don’t mix unrelated features in pull requests, that just makes it more confusing and more complicated to get anything done.

@chris-ch chris-ch closed this by deleting the head repository Sep 17, 2024
@chris-ch
Copy link
Contributor Author

chris-ch commented Sep 17, 2024

I re-forked the project, starting from scratch completely and from the "next" branch, the jar build is working:

$ ./gradlew jar

But then the tests fail:

@chris-ch ➜ /workspaces/fred (next) $ ./gradlew --parallel test

> Task :compileTestJava FAILED
/workspaces/fred/test/freenet/client/filter/TheoraBitstreamFilterTest.java:12: error: cannot find symbol
import static org.junit.Assert.assertThrows;
^
  symbol:   static assertThrows
  location: class Assert
/workspaces/fred/test/freenet/support/api/BooleanCallbackTest.java:4: error: cannot find symbol
import static org.junit.Assert.assertThrows;
^
  symbol:   static assertThrows
  location: class Assert
/workspaces/fred/test/freenet/support/SimpleFieldSetTest.java:20: error: cannot find symbol
import static org.hamcrest.Matchers.anEmptyMap;
^
  symbol:   static anEmptyMap
  location: class Matchers
...

Creating another PR dedicated to that.

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