Skip to content

Commit b0b132d

Browse files
committed
Fix reviews
1 parent 4c327ac commit b0b132d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/src/main/java/hudson/model/AsyncPeriodicWork.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public final void doRun() {
9292
try {
9393
if (thread != null && thread.isAlive()) {
9494
if (queueIfAlreadyRunning()) {
95-
logger.log(Level.FINE, "Scheduling another run of {0} since it is already running", name);
95+
logger.log(this.getSlowLoggingLevel(), "Scheduling another run of {0} since it is already running", name);
9696
pending.set(true);
9797
} else {
9898
logger.log(this.getSlowLoggingLevel(), "{0} thread is still running. Execution aborted.", name);
@@ -121,7 +121,7 @@ public final void doRun() {
121121
logger.log(Level.FINE, "Finished {0}. {1,number} ms",
122122
new Object[]{name, stopTime - startTime});
123123
thread = null;
124-
if (queueIfAlreadyRunning() && pending.getAndSet(false)) {
124+
if (pending.getAndSet(false)) {
125125
logger.log(this.getSlowLoggingLevel(), "An execution of {0} was requested while it was running, scheduling another run now", name);
126126
doRun();
127127
}

test/src/test/java/hudson/model/AsyncPeriodicWorkTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void extraCallGetsQueued() {
3939
await("The second call has been queued and executed later").until(instance::getCount, is(2));
4040
}
4141

42-
@TestExtension({"extraCallGetsIgnored", "extraCallGetsQueued"})
42+
@TestExtension
4343
public static class AsyncPeriodicWorkTestImpl extends AsyncPeriodicWork {
4444
private boolean queueIfAlreadyRunning;
4545
private int count = 0;

0 commit comments

Comments
 (0)