Skip to content

Commit 805e469

Browse files
authored
Create a new fdb-test-utils sub-project for some test utilities (#3631)
This moves things that were in `fdb-extensions` and needed for testing out into their own test-specific sub-project. The new project doesn't depend on any of the other sub-projects. I left `MultipleTransactions` behind in the testFixtures. It currently depends on `FDBError` (which is part of fdb-extensions), and currently no other project is depending on it, so I felt that leaving it made sense. This is in support of: #3574 -- see #3575 (comment)
1 parent 262e5c3 commit 805e469

25 files changed

+83
-25
lines changed

.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

actions/gradle-test/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ runs:
3131
- name: Copy Test Reports
3232
shell: bash
3333
if: always()
34-
run: mkdir -p test-reports && for d in fdb-java-annotations fdb-extensions fdb-record-layer-core fdb-record-layer-icu fdb-record-layer-spatial fdb-record-layer-lucene fdb-record-layer-jmh examples fdb-relational-api fdb-relational-core fdb-relational-cli fdb-relational-grpc fdb-relational-jdbc fdb-relational-server yaml-tests; do ln -s ../$d/.out/reports test-reports/$d; done
34+
run: mkdir -p test-reports && for d in fdb-java-annotations fdb-extensions fdb-test-utils fdb-record-layer-core fdb-record-layer-icu fdb-record-layer-spatial fdb-record-layer-lucene fdb-record-layer-jmh examples fdb-relational-api fdb-relational-core fdb-relational-cli fdb-relational-grpc fdb-relational-jdbc fdb-relational-server yaml-tests; do ln -s ../$d/.out/reports test-reports/$d; done

fdb-extensions/fdb-extensions.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ dependencies {
3030
implementation(libs.slf4j.api)
3131
compileOnly(libs.jsr305)
3232

33+
testImplementation project(':fdb-test-utils')
3334
testImplementation(libs.bundles.test.impl)
3435
testRuntimeOnly(libs.bundles.test.runtime)
3536
testCompileOnly(libs.bundles.test.compileOnly)

fdb-record-layer-core/fdb-record-layer-core.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ dependencies {
3535
compileOnly(libs.autoService)
3636
annotationProcessor(libs.autoService)
3737

38-
testImplementation testFixtures(project(':fdb-extensions'))
38+
testImplementation project(':fdb-test-utils')
3939
testImplementation(libs.bundles.test.impl)
4040
testRuntimeOnly(libs.bundles.test.runtime)
4141
testCompileOnly(libs.bundles.test.compileOnly)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private static FDB getInitedFDB() {
8888
synchronized (FDBDatabaseExtension.class) {
8989
if (fdb == null) {
9090
// Note: in some ways, this mirrors the TestDatabaseExtension abstraction in the
91-
// fdb-extensions project. We could re-use this here, except that if we did, we'd
91+
// fdb-test-utils project. We could re-use this here, except that if we did, we'd
9292
// never test the FDBDatabaseFactory's methods for initializing FDB
9393
FDBDatabaseFactory baseFactory = FDBDatabaseFactory.instance();
9494
if (TRACE) {

fdb-record-layer-icu/fdb-record-layer-icu.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies {
2828
compileOnly(libs.autoService)
2929
annotationProcessor(libs.autoService)
3030

31-
testImplementation testFixtures(project(':fdb-extensions'))
31+
testImplementation project(':fdb-test-utils')
3232
testImplementation project(path: coreProject, configuration: 'tests')
3333
testImplementation(libs.bundles.test.impl)
3434
testRuntimeOnly(libs.bundles.test.runtime)

fdb-record-layer-lucene/fdb-record-layer-lucene.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies {
3333
compileOnly(libs.autoService)
3434
annotationProcessor(libs.autoService)
3535

36-
testImplementation testFixtures(project(':fdb-extensions'))
36+
testImplementation project(':fdb-test-utils')
3737
testImplementation project(path: coreProject, configuration: 'tests')
3838
testImplementation(libs.bundles.test.impl)
3939
testImplementation(libs.lucene.testFramework)

fdb-record-layer-spatial/fdb-record-layer-spatial.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies {
3636
testImplementation(libs.bundles.test.impl)
3737
testRuntimeOnly(libs.bundles.test.runtime)
3838
testCompileOnly(libs.bundles.test.compileOnly)
39-
testImplementation testFixtures(project(':fdb-extensions'))
39+
testImplementation project(':fdb-test-utils')
4040
testImplementation project(path: coreProject, configuration: 'tests')
4141
}
4242

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* fdb-test-utils.gradle
3+
*
4+
* This source file is part of the FoundationDB open source project
5+
*
6+
* Copyright 2015-2025 Apple Inc. and the FoundationDB project authors
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
19+
*/
20+
21+
apply from: rootProject.file('gradle/publishing.gradle')
22+
23+
dependencies {
24+
api(libs.bundles.test.impl)
25+
api(libs.slf4j.api)
26+
compileOnly(libs.bundles.test.compileOnly)
27+
compileOnly(libs.jsr305)
28+
annotationProcessor(libs.autoService)
29+
implementation(libs.fdbJava)
30+
31+
testImplementation(libs.bundles.test.impl)
32+
testRuntimeOnly(libs.bundles.test.runtime)
33+
testCompileOnly(libs.bundles.test.compileOnly)
34+
testAnnotationProcessor(libs.autoService)
35+
}
36+
37+
publishing {
38+
publications {
39+
library(MavenPublication) {
40+
pom {
41+
description = 'Test utilities for FoundationDB Record Layer projects.'
42+
}
43+
}
44+
}
45+
}

0 commit comments

Comments
 (0)