Skip to content

Commit 0485336

Browse files
committed
limit boolean values to a single thread ; exclude parallel testing on relational subprojects
1 parent 6cc86a9 commit 0485336

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

fdb-record-layer-core/src/test/java/com/apple/foundationdb/record/provider/foundationdb/SynchronizedSessionTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ private void assertFailedContinueSession(SynchronizedSessionRunner synchronizedS
347347
private static Thread createThread(Collection<? super Throwable> uncaughtExceptions, Runnable task) {
348348
Thread t = new Thread(task);
349349
t.setName("synchronized-session-test-" + threadCounter.getAndIncrement());
350-
t.setDaemon(true);
350+
t.setDaemon(false);
351351
t.setUncaughtExceptionHandler((thread, exception) -> {
352352
LOGGER.error(KeyValueLogMessage.of("Uncaught exception in thread",
353353
"thread", thread.getName()

fdb-record-layer-core/src/test/java/com/apple/foundationdb/record/query/plan/cascades/BooleanValueTest.java

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
import org.junit.jupiter.api.Assertions;
5252
import org.junit.jupiter.api.Test;
5353
import org.junit.jupiter.api.extension.ExtensionContext;
54+
import org.junit.jupiter.api.parallel.Execution;
55+
import org.junit.jupiter.api.parallel.ExecutionMode;
5456
import org.junit.jupiter.params.ParameterizedTest;
5557
import org.junit.jupiter.params.provider.Arguments;
5658
import org.junit.jupiter.params.provider.ArgumentsProvider;
@@ -71,6 +73,7 @@
7173
* <li>Nullability tests.</li>
7274
* </ul>
7375
*/
76+
@Execution(ExecutionMode.SAME_THREAD) // necessary as the debugger can do weird things with the current quantifier if run in multiple threads
7477
class BooleanValueTest {
7578
private static final FieldValue F = FieldValue.ofFieldName(QuantifiedObjectValue.of(Quantifier.current(), Type.Record.fromFields(true, ImmutableList.of(Type.Record.Field.of(Type.primitiveType(Type.TypeCode.INT), Optional.of("f"))))), "f");
7679
private static final LiteralValue<Boolean> BOOL_TRUE = new LiteralValue<>(Type.primitiveType(Type.TypeCode.BOOLEAN), true);

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ apiVersion=710
3535

3636
mavenLocalEnabled=false
3737
org.gradle.daemon=true
38-
testConcurrency=10
38+
testConcurrency=5
3939

4040
url = 'https://github.com/FoundationDB/fdb-record-layer/'

gradle/testing.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ tasks.withType(Test).configureEach { task ->
222222
}
223223
task.testFramework.options.excludeTags.add('Performance')
224224

225-
if (task.name == 'test') {
225+
if (task.name == 'test' && project.name in ['fdb-extensions', 'fdb-record-layer-core', 'fdb-record-layer-lucene', 'fdb-record-layer-icu', 'fdb-record-layer-spatial']) {
226226
task.systemProperty('junit.jupiter.execution.parallel.enabled', 'true')
227227
task.systemProperty('junit.jupiter.execution.parallel.mode.default', 'concurrent')
228228
task.systemProperty('junit.jupiter.execution.parallel.mode.classes.default', 'concurrent')

0 commit comments

Comments
 (0)