Skip to content

Commit

Permalink
Fix LAT tests in TestTaskManagerBasic
Browse files Browse the repository at this point in the history
500 threads is too many. Fifteen must suffice.
(High repo contention.)
  • Loading branch information
mederly committed Mar 19, 2021
1 parent 350e587 commit fdfb10d
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -32,9 +32,9 @@
public class MockParallelTaskHandler implements TaskHandler {

private static final Trace LOGGER = TraceManager.getTrace(MockParallelTaskHandler.class);
public static final int NUM_SUBTASKS = 500;
public static final String NS_EXT = "http://myself.me/schemas/whatever";
public static final ItemName DURATION_QNAME = new ItemName(NS_EXT, "duration", "m");
static final int NUM_SUBTASKS = 15; // Shouldn't be too high because of concurrent repository access.
private static final String NS_EXT = "http://myself.me/schemas/whatever";
private static final ItemName DURATION_QNAME = new ItemName(NS_EXT, "duration", "m");

private TaskManagerQuartzImpl taskManager;

Expand All @@ -56,7 +56,7 @@ public static class MyLightweightTaskHandler implements LightweightTaskHandler {
private final long duration;
private static final long STEP = 100;

public MyLightweightTaskHandler(Integer duration) {
MyLightweightTaskHandler(Integer duration) {
this.duration = duration != null ? duration : 86400L * 1000L * 365000L; // 1000 years
}

Expand Down Expand Up @@ -92,10 +92,10 @@ public void run(RunningLightweightTask task) {
hasExited = true;
}

public boolean hasRun() {
boolean hasRun() {
return hasRun;
}
public boolean hasExited() {
boolean hasExited() {
return hasExited;
}
}
Expand Down Expand Up @@ -183,7 +183,7 @@ public void setTaskManager(TaskManagerQuartzImpl taskManager) {
this.taskManager = taskManager;
}

public RunningTask getLastTaskExecuted() {
RunningTask getLastTaskExecuted() {
return lastTaskExecuted;
}

Expand Down

0 comments on commit fdfb10d

Please sign in to comment.