Skip to content

Commit

Permalink
Test fix attempt (#15726)
Browse files Browse the repository at this point in the history
* test: Attempt to fix failure on Jenkins only

* refactor: Rename variable

* fix: Update time for resource tables

* add debug code

---------

Co-authored-by: Viet Nguyen <[email protected]>
  • Loading branch information
maikelarabori and vietnguyen authored Nov 16, 2023
1 parent 77a9662 commit 07efe3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ public void generateResourceTables(JobProgress progress) {
// -------------------------------------------------------------------------

private void generateResourceTablesInternal(JobProgress progress) {
final Date startTime = new Date();

resourceTableService.dropAllSqlViews(progress);

Map<String, Runnable> generators = new LinkedHashMap<>();
Expand Down Expand Up @@ -184,6 +182,6 @@ private void generateResourceTablesInternal(JobProgress progress) {
resourceTableService.createAllSqlViews(progress);

systemSettingManager.saveSystemSetting(
SettingKey.LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE, startTime);
SettingKey.LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE, new Date());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,11 @@ void resourceTablesTimestampUpdated() {
systemSettingManager.getSystemSetting(
SettingKey.LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE, Date.class);
assertNotEquals(null, resourceTablesUpdated);
assertTrue(tableLastUpdated.compareTo(processStartTime) > 0);
assertTrue(resourceTablesUpdated.compareTo(processStartTime) > 0);
assertTrue(
tableLastUpdated.compareTo(processStartTime) > 0,
String.format("%s > %s", tableLastUpdated, processStartTime));
assertTrue(
resourceTablesUpdated.compareTo(processStartTime) > 0,
String.format("%s > %s", resourceTablesUpdated, processStartTime));
}
}

0 comments on commit 07efe3d

Please sign in to comment.