Skip to content

Conversation

@yagee-de
Copy link
Member

@yagee-de yagee-de commented Feb 6, 2026

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef30f85088

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 633 to 636
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>

Choose a reason for hiding this comment

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

P2 Badge Add JUnit Jupiter engine so tests actually run

This POM now only declares junit-jupiter-api, which is compile-time only; without junit-jupiter-engine (or another JUnit 5 provider configured elsewhere), Maven Surefire won’t discover/run any JUnit 5 tests. I couldn’t find any junit-jupiter-engine/junit-platform dependency in this repo, so CI can start “passing” while silently skipping tests unless the parent POM supplies the engine.

Useful? React with 👍 / 👎.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the test suite from JUnit 4 to JUnit 5 (Jupiter). The migration updates test classes to use JUnit 5 annotations, assertion methods, and the MyCoRe test framework's JUnit 5 support.

Changes:

  • Replaced JUnit 4 dependency with JUnit 5 Jupiter dependencies in pom.xml
  • Migrated all test classes from JUnit 4 annotations (@before, @test from org.junit) to JUnit 5 equivalents (@beforeeach, @test from org.junit.jupiter.api)
  • Replaced static assertion imports and calls (Assert.assertEquals) with JUnit 5 Assertions class (Assertions.assertEquals)
  • Updated base test classes from MCRTestCase/MCRJPATestCase to use @MyCoReTest annotation and appropriate extensions (@ExtendWith)
  • Migrated test configuration from getTestProperties() method to declarative @MCRTestConfiguration annotations

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pom.xml Removed JUnit 4 dependency, added JUnit 5 Jupiter API and engine dependencies
TestEntityFactory.java Migrated from MCRTestCase to @MyCoReTest, updated assertions and configuration approach
JerseyTestCase.java Updated to use @MyCoReTest with @ExtendWith(MCRMetadataExtension.class), removed JUnit 4 setup methods
TestSlotEntry.java Migrated from MCRTestCase to @MyCoReTest, updated assertions to use Assertions class
TestSlot.java Migrated from MCRJPATestCase to @MyCoReTest with JPA and Metadata extensions, updated transaction management
TestRCResource.java Added @ExtendWith(MCRJPAExtension.class), updated to use JUnit 5 static imports
TestRCCalendar.java Migrated from MCRTestCase to @MyCoReTest, updated assertions
TestPeriod.java Migrated from MCRTestCase to @MyCoReTest, updated assertions
DBTMapObjectIDURNGeneratorTest.java Migrated from MCRTestCase to @MyCoReTest, updated configuration approach
TestOPCResource.java Added @MCRTestConfiguration annotation, but changed configuration key (potential issue)
TestOPCResolver.java Migrated from MCRTestCase to @MyCoReTest, updated assertions
TestOPCConnector.java Migrated from MCRTestCase to @MyCoReTest, updated assertions
TestMediaServiceResource.java Updated to use JUnit 5 imports and annotations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yagee-de yagee-de merged commit 73dab30 into 2025.06.x Feb 6, 2026
7 checks passed
@yagee-de yagee-de deleted the issues/DBT-401-update-unit-tests-to-junit-5 branch February 6, 2026 16:03
yagee-de added a commit that referenced this pull request Feb 6, 2026
* 2025.06.x:
  DBT-401 update unit tests to Junit 5 (#305)
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.

1 participant