Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIFI-9233 - Improve reliability of system integration tests #5731

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,11 @@ public void run() {
if (logger.isTraceEnabled()) {
logger.trace("Waiting for write lock and then will save");
}
writeLock.lock();
final boolean lockObtained = writeLock.tryLock(10, TimeUnit.MILLISECONDS);
if (!lockObtained) {
logger.trace("Could not obtain lock so will not write flow to disk during this iteration.");
return;
}
try {
dao.save(controller, holder.shouldArchive);
// Nulling it out if it is still set to our current SaveHolder. Otherwise leave it alone because it means
Expand Down Expand Up @@ -1149,7 +1153,7 @@ public void run() {
}
}

private class SaveHolder {
private static class SaveHolder {

private final Calendar saveTime;
private final boolean shouldArchive;
Expand Down