Skip to content

Commit ac78bb3

Browse files
committed
lower the upper bound of tests
1 parent 93e594c commit ac78bb3

4 files changed

Lines changed: 7 additions & 13 deletions

File tree

examples/src/main/java/software/amazon/lambda/durable/examples/ManyAsyncChildContextExample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public record Output(long result, long executionTimeMs, long replayTimeMs) {}
3030
@Override
3131
public Output handleRequest(Input input, DurableContext context) {
3232
var startTime = System.nanoTime();
33-
var multiplier = input.multiplier() > 0 ? input.multiplier() : 1;
34-
var steps = input.steps() > 0 ? input.steps() : 500;
33+
var multiplier = input.multiplier();
34+
var steps = input.steps();
3535
var logger = context.getLogger();
3636

3737
logger.info("Starting {} async child context with multiplier {}", steps, multiplier);

examples/src/main/java/software/amazon/lambda/durable/examples/ManyAsyncStepsExample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public record Output(long result, long executionTimeMs, long replayTimeMs) {}
3131
@Override
3232
public Output handleRequest(Input input, DurableContext context) {
3333
var startTime = System.nanoTime();
34-
var multiplier = input.multiplier() > 0 ? input.multiplier() : 1;
35-
var steps = input.steps() > 0 ? input.steps : 500;
34+
var multiplier = input.multiplier();
35+
var steps = input.steps();
3636
var logger = context.getLogger();
3737

3838
logger.info("Starting {} async steps with multiplier {}", steps, multiplier);

examples/src/test/java/software/amazon/lambda/durable/examples/CloudBasedIntegrationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ void testChildContextExample() {
466466
}
467467

468468
@ParameterizedTest
469-
@CsvSource({"100, 1000, 10", "500, 2000, 20", "1000, 3000, 30", "2000, 5000, 40", "4000, 10000, 50"})
469+
@CsvSource({"100, 1000, 10", "500, 2000, 20", "1000, 3000, 30", "2000, 5000, 40"})
470470
void testManyAsyncStepsExample(int steps, long maxExecutionTime, long maxReplayTime) {
471471
long minimalExecutionTimeMs = Long.MAX_VALUE;
472472
long minimalReplayTimeMs = Long.MAX_VALUE;
@@ -502,7 +502,7 @@ void testManyAsyncStepsExample(int steps, long maxExecutionTime, long maxReplayT
502502
}
503503

504504
@ParameterizedTest
505-
@CsvSource({"100, 1500, 10", "500, 3000, 20", "1000, 4500, 30", "2000, 10000, 50"})
505+
@CsvSource({"100, 1500, 10", "500, 3000, 20", "1000, 4500, 30"})
506506
void testManyAsyncChildContextExample(int steps, long maxExecutionTime, long maxReplayTime) {
507507
long minimalExecutionTimeMs = Long.MAX_VALUE;
508508
long minimalReplayTimeMs = Long.MAX_VALUE;

sdk/src/main/java/software/amazon/lambda/durable/DurableConfig.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,7 @@ private static String getProjectVersion(String versionFile) {
237237
*/
238238
private static ExecutorService createDefaultExecutor() {
239239
logger.debug("Creating default ExecutorService");
240-
// return Executors.newVirtualThreadPerTaskExecutor();
241-
return Executors.newCachedThreadPool(r -> {
242-
Thread t = new Thread(r);
243-
t.setName("durable-exec-" + t.getId());
244-
t.setDaemon(true);
245-
return t;
246-
});
240+
return Executors.newVirtualThreadPerTaskExecutor();
247241
}
248242

249243
/** Builder for DurableConfig. Provides fluent API for configuring SDK components. */

0 commit comments

Comments
 (0)