Skip to content

Comments

MLE-27078 Fixes for bitemp tests#1907

Merged
rjrudin merged 1 commit intodevelopfrom
feature/bitemp-test
Feb 19, 2026
Merged

MLE-27078 Fixes for bitemp tests#1907
rjrudin merged 1 commit intodevelopfrom
feature/bitemp-test

Conversation

@rjrudin
Copy link
Contributor

@rjrudin rjrudin commented Feb 19, 2026

Lot of small general improvements too.

@rjrudin rjrudin requested a review from BillFarber as a code owner February 19, 2026 14:43
Copilot AI review requested due to automatic review settings February 19, 2026 14:43
@rjrudin rjrudin requested a review from stevebio as a code owner February 19, 2026 14:43
@github-actions
Copy link

github-actions bot commented Feb 19, 2026

Copyright Validation Results
Total: 1 | Passed: 1 | Failed: 0 | Skipped: 0 | at: 2026-02-19 15:15:27 UTC | commit: 99eb623

✅ Valid Files

  • marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/functionaltest/TestBiTemporal.java

✅ All files have valid copyright headers!

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 addresses fixes for bitemporal tests (MLE-27078) in the TestBiTemporal test class, along with various code quality improvements. The changes modernize test assertions, clean up unused code, and make error message validations more flexible.

Changes:

  • Updated copyright year to 2026 and changed class visibility from public to package-private
  • Modernized test assertions from assertTrue(x == y) to assertEquals(expected, actual) pattern for better error messages
  • Improved error message assertions to check partial content rather than exact strings, making tests more resilient to format variations
  • Cleaned up unused variables and removed unhelpful debug statements and exception handlers

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

Comment on lines 254 to 257
validStartDate.equals("2001-01-01T00:00:00");
validEndDate.equals("2011-12-31T23:59:59");
systemStartDate.equals("2005-01-01T00:00:01-08:00");
systemEndDate.equals("2010-01-01T00:00:01-08:00");
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

The assertions have been removed, leaving only statements that call equals() but don't check the results. These lines perform no validation and should either be removed entirely or wrapped in assertions. The original assertTrue statement was checking all four conditions together, but now none of the results are being validated.

Suggested change
validStartDate.equals("2001-01-01T00:00:00");
validEndDate.equals("2011-12-31T23:59:59");
systemStartDate.equals("2005-01-01T00:00:01-08:00");
systemEndDate.equals("2010-01-01T00:00:01-08:00");
assertEquals("2001-01-01T00:00:00", validStartDate);
assertEquals("2011-12-31T23:59:59", validEndDate);
assertEquals("2005-01-01T00:00:01-08:00", systemStartDate);
assertEquals("2010-01-01T00:00:01-08:00", systemEndDate);

Copilot uses AI. Check for mistakes.
DocumentPage termQueryResultsLSQT = docMgrQy.search(periodQueryLSQT, startLSQT);

assertTrue(termQueryResultsLSQT.getTotalPages() == 0);
assertTrue(termQueryResultsLSQT.size() == 0);
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

These assertTrue statements with equality checks should be converted to assertEquals for consistency with the changes made elsewhere in this file (e.g., lines 1467-1468, 1495-1496, 1505-1506, 3681-3682). Using assertEquals provides better error messages and follows the modern JUnit assertion pattern.

Suggested change
assertTrue(termQueryResultsLSQT.size() == 0);
assertEquals(0, termQueryResultsLSQT.size());

Copilot uses AI. Check for mistakes.
import static org.junit.jupiter.api.Assertions.*;

public class TestBiTemporal extends BasicJavaClientREST {
class TestBiTemporal extends BasicJavaClientREST {
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

The class visibility was changed from public to package-private. While JUnit 5 allows this, it's inconsistent with other test classes in the same package (e.g., TestBiTempMetaValues, TestAutomatedPathRangeIndex) which are all declared as public. Consider keeping the visibility as public for consistency unless there's a specific reason for this change.

Suggested change
class TestBiTemporal extends BasicJavaClientREST {
public class TestBiTemporal extends BasicJavaClientREST {

Copilot uses AI. Check for mistakes.
Lot of small general improvements too.
@rjrudin rjrudin force-pushed the feature/bitemp-test branch from 8d695d1 to 99eb623 Compare February 19, 2026 15:15
@rjrudin rjrudin merged commit fb5f639 into develop Feb 19, 2026
4 of 5 checks passed
@rjrudin rjrudin deleted the feature/bitemp-test branch February 19, 2026 15:46
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