Skip to content

Commit

Permalink
Merge pull request conductor-oss#223 from aradu-atlassian/dependency/…
Browse files Browse the repository at this point in the history
…bump-guava

Bump guava to 33.2.1-jre latest of right now to fix vulnerabilities.
  • Loading branch information
v1r3n authored Aug 9, 2024
2 parents 07c9063 + 4c7aa0f commit 1ab9169
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ext {
revEurekaClient = '1.10.10'
revGroovy = '4.0.9'
revGrpc = '1.57.2'
revGuava = '30.0-jre'
revGuava = '33.2.1-jre'
revHamcrestAllMatchers = '1.8'
revHealth = '1.1.4'
revPostgres = '42.7.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,11 @@ private List<Map<String, Object>> queryDb(String query) throws SQLException {

private void waitForCacheFlush() throws InterruptedException {
long startTime = System.currentTimeMillis();
long lastDiff =
System.currentTimeMillis() - ((PostgresPollDataDAO) pollDataDAO).getLastFlushTime();
long lastFlushTime = ((PostgresPollDataDAO) pollDataDAO).getLastFlushTime();

if (lastDiff == 0) {
return;
}

while (true) {
long currentDiff =
System.currentTimeMillis()
- ((PostgresPollDataDAO) pollDataDAO).getLastFlushTime();

if (currentDiff < lastDiff || System.currentTimeMillis() - startTime > 1000) {
return;
}

lastDiff = currentDiff;

Thread.sleep(1);
while (System.currentTimeMillis() - startTime < 1000
&& lastFlushTime <= ((PostgresPollDataDAO) pollDataDAO).getLastFlushTime()) {
Thread.sleep(10);
}
}

Expand Down

0 comments on commit 1ab9169

Please sign in to comment.