Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
filiphr committed Nov 20, 2023
1 parent ef80146 commit e33d9f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ public List<String> getTablesPresentInDatabase() {
}

protected String getTableNameFilter(DatabaseMetaData databaseMetaData, String databaseTablePrefix, String flowableTablePrefix) throws SQLException {
// We are using the search string escape for the filter since the underscore character (_) means match any character when used in LIKE.
// However, we want to get the tables that do have that charactery literally
String tableNameFilter;
if ("postgres".equals(getDbSqlSession().getDbSqlSessionFactory().getDatabaseType())
|| "cockroachdb".equals(getDbSqlSession().getDbSqlSessionFactory().getDatabaseType())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void testGetTableMetaData() {
}

@Test
public void testTableCountWithCustomTables() {
public void testTableCountWithCustomTablesWithoutActOrFlwPrefix() {
String tablePrefix = processEngineConfiguration.getDatabaseTablePrefix();
try {

Expand All @@ -120,6 +120,9 @@ public void testTableCountWithCustomTables() {
}
return null;
});

// ManagementService#getTableCount returns the counts of the flowable tables (tables with the FLW_ and ACT_ prefix)
// Therefore, the FLWTEST and ACTIVITY_TEST tables should not be included in the table count
Map<String, Long> tableCount = managementService.getTableCount();
assertThat(tableCount)
.doesNotContainKeys(
Expand Down

0 comments on commit e33d9f7

Please sign in to comment.