Skip to content

Commit

Permalink
limit boolean values to a single thread ; exclude parallel testing on…
Browse files Browse the repository at this point in the history
… relational subprojects
  • Loading branch information
alecgrieser committed Jan 21, 2025
1 parent 6cc86a9 commit 0485336
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ private void assertFailedContinueSession(SynchronizedSessionRunner synchronizedS
private static Thread createThread(Collection<? super Throwable> uncaughtExceptions, Runnable task) {
Thread t = new Thread(task);
t.setName("synchronized-session-test-" + threadCounter.getAndIncrement());
t.setDaemon(true);
t.setDaemon(false);
t.setUncaughtExceptionHandler((thread, exception) -> {
LOGGER.error(KeyValueLogMessage.of("Uncaught exception in thread",
"thread", thread.getName()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.api.parallel.Execution;
import org.junit.jupiter.api.parallel.ExecutionMode;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.ArgumentsProvider;
Expand All @@ -71,6 +73,7 @@
* <li>Nullability tests.</li>
* </ul>
*/
@Execution(ExecutionMode.SAME_THREAD) // necessary as the debugger can do weird things with the current quantifier if run in multiple threads
class BooleanValueTest {
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");
private static final LiteralValue<Boolean> BOOL_TRUE = new LiteralValue<>(Type.primitiveType(Type.TypeCode.BOOLEAN), true);
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ apiVersion=710

mavenLocalEnabled=false
org.gradle.daemon=true
testConcurrency=10
testConcurrency=5

url = 'https://github.com/FoundationDB/fdb-record-layer/'
2 changes: 1 addition & 1 deletion gradle/testing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ tasks.withType(Test).configureEach { task ->
}
task.testFramework.options.excludeTags.add('Performance')

if (task.name == 'test') {
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']) {
task.systemProperty('junit.jupiter.execution.parallel.enabled', 'true')
task.systemProperty('junit.jupiter.execution.parallel.mode.default', 'concurrent')
task.systemProperty('junit.jupiter.execution.parallel.mode.classes.default', 'concurrent')
Expand Down

0 comments on commit 0485336

Please sign in to comment.