Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${javadocPluginVersion}</version>
<configuration>
<additionalOptions>
<additionalOption>-Xdoclint:all,-missing</additionalOption>
</additionalOptions>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
3 changes: 3 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@
</action>
<!-- dependabot:dep=actions/setup-java:new=5.7.0:pr=903 -->
<action dev="dependabot" type="update" due-to="Dependabot">Update github_actions dependency actions/setup-java from 5.6.0 to 5.7.0 (#903).</action>
<action dev="jeffjensen" type="fix" issue="904" system="github" due-to="jeffjensen">
Fix the Javadoc @param/@return/@throws gaps across the main source tree that issue 902's from-scratch doclint pass left unaddressed since they are warnings, not build-failing errors: missing one-sentence summaries on classes/interfaces/methods/fields whose doc block was tag-only (doclint's "no main description"), entirely missing or description-less @param/@return/@throws tags, and missing field/method comments including on org.dbunit.assertion.DbComparisonFailure's and PropertyChangeMulticaster's private fields and readObject/writeObject methods, which doclint checks regardless of visibility once a class implements Serializable.
</action>
</release>
<release version="3.4.0" date="Jul 28, 2026" description="Test-suite hardening (un-skip and strengthen dozens of disabled/no-op tests); add CachingConnectionProvider and reduce DefaultPrepAndExpectedTestCase's per-test connection churn; pin identifier case-folding to Locale.ENGLISH for Turkish-locale correctness; and a broad set of correctness fixes across export formats (XML, YAML, CSV, XLS, Ant), TimestampDataType timezone handling, InsertOperation/TransactionOperation, and resource-leak cleanups">
<action dev="jeffjensen" type="fix" issue="797" system="github" due-to="jeffjensen">
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/dbunit/AbstractDatabaseTester.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ protected String getSchema()

/**
* Returns the DatabaseOperation to call when starting the test.
*
* @return the setup {@link DatabaseOperation}.
*/
public DatabaseOperation getSetUpOperation()
{
Expand All @@ -173,6 +175,8 @@ public DatabaseOperation getSetUpOperation()

/**
* Returns the DatabaseOperation to call when ending the test.
*
* @return the tear-down {@link DatabaseOperation}.
*/
public DatabaseOperation getTearDownOperation()
{
Expand Down
108 changes: 108 additions & 0 deletions src/main/java/org/dbunit/Assertion.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ private Assertion()
}

/**
* Asserts that the two specified datasets' tables are equal, ignoring the given columns.
*
* @param expectedDataset dataset containing the expected results.
* @param actualDataset dataset containing the actual results.
* @param tableName name of the table to compare.
* @param ignoreCols columns to ignore during comparison.
* @throws DatabaseUnitException if an error occurs during comparison.
* @see DbUnitAssert#assertEqualsIgnoreCols(IDataSet, IDataSet, String,
* String[])
*/
Expand All @@ -74,6 +81,12 @@ public static void assertEqualsIgnoreCols(final IDataSet expectedDataset,
}

/**
* Asserts that the two specified tables are equal, ignoring the given columns.
*
* @param expectedTable table containing the expected results.
* @param actualTable table containing the actual results.
* @param ignoreCols columns to ignore during comparison.
* @throws DatabaseUnitException if an error occurs during comparison.
* @see DbUnitAssert#assertEqualsIgnoreCols(ITable, ITable, String[])
*/
public static void assertEqualsIgnoreCols(final ITable expectedTable,
Expand All @@ -85,6 +98,15 @@ public static void assertEqualsIgnoreCols(final ITable expectedTable,
}

/**
* Asserts that the specified dataset table matches the given query's result, ignoring the given columns.
*
* @param expectedDataset dataset containing the expected results.
* @param connection connection used to query the actual results.
* @param sqlQuery SQL query used to obtain the actual results.
* @param tableName name of the table being compared.
* @param ignoreCols columns to ignore during comparison.
* @throws DatabaseUnitException if an error occurs during comparison.
* @throws SQLException if an error occurs while executing the query.
* @see DbUnitAssert#assertEqualsByQuery(IDataSet, IDatabaseConnection,
* String, String, String[])
*/
Expand All @@ -98,6 +120,15 @@ public static void assertEqualsByQuery(final IDataSet expectedDataset,
}

/**
* Asserts that the specified table matches the given query's result, ignoring the given columns.
*
* @param expectedTable table containing the expected results.
* @param connection connection used to query the actual results.
* @param tableName name of the table being compared.
* @param sqlQuery SQL query used to obtain the actual results.
* @param ignoreCols columns to ignore during comparison.
* @throws DatabaseUnitException if an error occurs during comparison.
* @throws SQLException if an error occurs while executing the query.
* @see DbUnitAssert#assertEqualsByQuery(ITable, IDatabaseConnection,
* String, String, String[])
*/
Expand All @@ -111,6 +142,11 @@ public static void assertEqualsByQuery(final ITable expectedTable,
}

/**
* Asserts that the two specified datasets are equal.
*
* @param expectedDataSet dataset containing the expected results.
* @param actualDataSet dataset containing the actual results.
* @throws DatabaseUnitException if an error occurs during comparison.
* @see DbUnitAssert#assertEquals(IDataSet, IDataSet)
*/
public static void assertEquals(final IDataSet expectedDataSet,
Expand All @@ -120,6 +156,12 @@ public static void assertEquals(final IDataSet expectedDataSet,
}

/**
* Asserts that the two specified datasets are equal.
*
* @param expectedDataSet dataset containing the expected results.
* @param actualDataSet dataset containing the actual results.
* @param failureHandler the failure handler used to report mismatches.
* @throws DatabaseUnitException if an error occurs during comparison.
* @see DbUnitAssert#assertEquals(IDataSet, IDataSet, FailureHandler)
* @since 2.4
*/
Expand All @@ -132,6 +174,11 @@ public static void assertEquals(final IDataSet expectedDataSet,
}

/**
* Asserts that the two specified tables are equal.
*
* @param expectedTable table containing the expected results.
* @param actualTable table containing the actual results.
* @throws DatabaseUnitException if an error occurs during comparison.
* @see DbUnitAssert#assertEquals(ITable, ITable)
*/
public static void assertEquals(final ITable expectedTable,
Expand All @@ -141,6 +188,12 @@ public static void assertEquals(final ITable expectedTable,
}

/**
* Asserts that the two specified tables are equal.
*
* @param expectedTable table containing the expected results.
* @param actualTable table containing the actual results.
* @param additionalColumnInfo additional columns to include in failure messages.
* @throws DatabaseUnitException if an error occurs during comparison.
* @see DbUnitAssert#assertEquals(ITable, ITable, Column[])
*/
public static void assertEquals(final ITable expectedTable,
Expand All @@ -152,6 +205,12 @@ public static void assertEquals(final ITable expectedTable,
}

/**
* Asserts that the two specified tables are equal.
*
* @param expectedTable table containing the expected results.
* @param actualTable table containing the actual results.
* @param failureHandler the failure handler used to report mismatches.
* @throws DatabaseUnitException if an error occurs during comparison.
* @see DbUnitAssert#assertEquals(ITable, ITable, FailureHandler)
* @since 2.4
*/
Expand All @@ -164,6 +223,13 @@ public static void assertEquals(final ITable expectedTable,
}

/**
* Asserts that the two specified datasets are equal, using the given value comparers.
*
* @param expectedDataSet dataset containing the expected results.
* @param actualDataSet dataset containing the actual results.
* @param defaultValueComparer the value comparer used when no more specific comparer is configured.
* @param tableColumnValueComparers the per-table, per-column value comparers to use.
* @throws DatabaseUnitException if an error occurs during comparison.
* @see DbUnitValueComparerAssert#assertWithValueComparer(IDataSet,
* IDataSet, ValueComparer, Map)
* @since 2.6.0
Expand All @@ -179,6 +245,13 @@ public static void assertWithValueComparer(final IDataSet expectedDataSet,
}

/**
* Asserts that the two specified tables are equal, using the given value comparers.
*
* @param expectedTable table containing the expected results.
* @param actualTable table containing the actual results.
* @param defaultValueComparer the value comparer used when no more specific comparer is configured.
* @param columnValueComparers the per-column value comparers to use.
* @throws DatabaseUnitException if an error occurs during comparison.
* @see DbUnitValueComparerAssert#assertWithValueComparer(ITable, ITable,
* ValueComparer, Map)
* @since 2.6.0
Expand All @@ -193,6 +266,14 @@ public static void assertWithValueComparer(final ITable expectedTable,
}

/**
* Asserts that the two specified datasets are equal, using the given value comparers.
*
* @param expectedDataSet dataset containing the expected results.
* @param actualDataSet dataset containing the actual results.
* @param failureHandler the failure handler used to report mismatches.
* @param defaultValueComparer the value comparer used when no more specific comparer is configured.
* @param tableColumnValueComparers the per-table, per-column value comparers to use.
* @throws DatabaseUnitException if an error occurs during comparison.
* @see DbUnitValueComparerAssert#assertWithValueComparer(IDataSet,
* IDataSet, FailureHandler, ValueComparer, Map)
* @since 2.6.0
Expand All @@ -209,6 +290,14 @@ public static void assertWithValueComparer(final IDataSet expectedDataSet,
}

/**
* Asserts that the two specified tables are equal, using the given value comparers.
*
* @param expectedTable table containing the expected results.
* @param actualTable table containing the actual results.
* @param additionalColumnInfo additional columns to include in failure messages.
* @param defaultValueComparer the value comparer used when no more specific comparer is configured.
* @param columnValueComparers the per-column value comparers to use.
* @throws DatabaseUnitException if an error occurs during comparison.
* @see DbUnitValueComparerAssert#assertWithValueComparer(ITable, ITable,
* Column[], ValueComparer, Map)
* @since 2.6.0
Expand All @@ -225,6 +314,14 @@ public static void assertWithValueComparer(final ITable expectedTable,
}

/**
* Asserts that the two specified tables are equal, using the given value comparers.
*
* @param expectedTable table containing the expected results.
* @param actualTable table containing the actual results.
* @param failureHandler the failure handler used to report mismatches.
* @param defaultValueComparer the value comparer used when no more specific comparer is configured.
* @param columnValueComparers the per-column value comparers to use.
* @throws DatabaseUnitException if an error occurs during comparison.
* @see DbUnitValueComparerAssert#assertWithValueComparer(ITable, ITable,
* FailureHandler, ValueComparer, Map)
* @since 2.6.0
Expand All @@ -240,11 +337,22 @@ public static void assertWithValueComparer(final ITable expectedTable,
columnValueComparers);
}

/**
* Returns the shared {@link DbUnitAssert} instance used for equals-based comparisons.
*
* @return the shared {@link DbUnitAssert} instance.
*/
public static DbUnitAssert getEqualsInstance()
{
return EQUALS_INSTANCE;
}

/**
* Returns the shared {@link DbUnitValueComparerAssert} instance used for value-comparer-based
* comparisons.
*
* @return the shared {@link DbUnitValueComparerAssert} instance.
*/
public static DbUnitValueComparerAssert getValueCompareInstance()
{
return VALUE_COMPARE_INSTANCE;
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/org/dbunit/DBTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,18 @@ public abstract class DBTestCase extends DatabaseTestCase {
*/
private static final Logger logger = LoggerFactory.getLogger(DBTestCase.class);

/**
* Creates a testCase with no name.
*/
public DBTestCase() {
super();
}

/**
* Creates a testCase with the given name.
*
* @param name the test case name.
*/
public DBTestCase(String name) {
super(name);
}
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/org/dbunit/DataSourceBasedDBTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,18 @@ public abstract class DataSourceBasedDBTestCase extends DBTestCase
*/
private static final Logger logger = LoggerFactory.getLogger(DataSourceBasedDBTestCase.class);

/**
* Creates a testCase with no name.
*/
public DataSourceBasedDBTestCase()
{
}

/**
* Creates a testCase with the given name.
*
* @param name the test case name.
*/
public DataSourceBasedDBTestCase( String name )
{
super( name );
Expand All @@ -65,6 +73,8 @@ protected IDatabaseTester newDatabaseTester()

/**
* Returns the test DataSource.
*
* @return the test DataSource.
*/
protected abstract DataSource getDataSource();
}
Loading
Loading