Skip to content

Commit 163cbb9

Browse files
committed
Merge branch 'release-4.3.x'
2 parents c124b04 + 145da72 commit 163cbb9

File tree

24 files changed

+274
-1428
lines changed

24 files changed

+274
-1428
lines changed

.github/workflows/build-java-app-workflow.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,12 @@ jobs:
1515
- uses: actions/checkout@v2
1616
with:
1717
fetch-depth: '10'
18-
- name: Setup Maven Action
19-
20-
with:
21-
java-version: 8
22-
maven-version: 3.6.3
23-
- name: Set up JDK 1.8
18+
- name: Set up JDK 8
2419
uses: actions/setup-java@v2
2520
with:
26-
distribution: 'zulu'
21+
distribution: 'temurin'
2722
java-version: '8'
23+
cache: 'maven'
2824
- name: Cache Maven packages
2925
uses: actions/cache@v2
3026
with:

.github/workflows/deploy-maven-repository-workflow.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,12 @@ jobs:
2424
- uses: actions/checkout@v2
2525
with:
2626
fetch-depth: '10'
27-
- name: Setup Maven Action
28-
29-
with:
30-
java-version: 8
31-
maven-version: 3.6.3
32-
- name: Set up JDK 1.8
27+
- name: Set up JDK 8
3328
uses: actions/setup-java@v2
3429
with:
35-
distribution: 'zulu'
30+
distribution: 'temurin'
3631
java-version: '8'
32+
cache: 'maven'
3733
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
3834
server-username: MAVEN_NEXUS_USER # env variable for username in deploy
3935
server-password: MAVEN_NEXUS_PASSWORD # env variable for token in deploy

.github/workflows/develop.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ jobs:
2929
- uses: actions/checkout@v2
3030
with:
3131
fetch-depth: '10'
32-
- name: Set up JDK 1.8
32+
- name: Set up JDK 8
3333
uses: actions/setup-java@v2
3434
with:
35-
distribution: 'zulu'
35+
distribution: 'temurin'
3636
java-version: '8'
37+
cache: 'maven'
3738
- name: Cache Maven packages
3839
uses: actions/cache@v2
3940
with:

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ jobs:
2828
- uses: actions/checkout@v2
2929
with:
3030
fetch-depth: '10'
31-
- name: Set up JDK 1.8
31+
- name: Set up JDK 8
3232
uses: actions/setup-java@v2
3333
with:
34-
distribution: 'zulu'
34+
distribution: 'temurin'
3535
java-version: '8'
36+
cache: 'maven'
3637
- name: Cache Maven packages
3738
uses: actions/cache@v2
3839
with:

.github/workflows/sonar-analysis-workflow.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,12 @@ jobs:
1717
- uses: actions/checkout@v2
1818
with:
1919
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
20-
- name: Setup Maven Action
21-
22-
with:
23-
java-version: 8
24-
maven-version: 3.6.3
25-
- name: Set up JDK 11
20+
- name: Set up JDK 8
2621
uses: actions/setup-java@v2
2722
with:
28-
distribution: 'zulu'
29-
java-version: '11'
23+
distribution: 'temurin'
24+
java-version: '8'
25+
cache: 'maven'
3026
- name: Cache SonarCloud packages
3127
uses: actions/cache@v1
3228
with:

.github/workflows/task.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Push java-common-libs develop
2+
3+
on:
4+
push:
5+
branches:
6+
- TASK-*
7+
8+
jobs:
9+
build:
10+
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
11+
12+
sonar:
13+
uses: opencb/java-common-libs/.github/workflows/sonar-analysis-workflow.yml@develop
14+
needs: build
15+
with:
16+
sonarProjectKey: opencb_java-common-libs
17+
secrets:
18+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
19+
20+
test:
21+
name: Test java-common-libs
22+
runs-on: ubuntu-20.04
23+
needs: build
24+
strategy:
25+
matrix:
26+
mongodb: ["4.2"]
27+
steps:
28+
- uses: actions/checkout@v2
29+
with:
30+
fetch-depth: '10'
31+
- name: Set up JDK 8
32+
uses: actions/setup-java@v2
33+
with:
34+
distribution: 'temurin'
35+
java-version: '8'
36+
cache: 'maven'
37+
- name: Cache Maven packages
38+
uses: actions/cache@v2
39+
with:
40+
path: ~/.m2/repository
41+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
42+
restore-keys: ${{ runner.os }}-maven
43+
- name: Start MongoDB v${{ matrix.mongodb }}
44+
uses: supercharge/[email protected]
45+
with:
46+
mongodb-version: ${{ matrix.mongodb }}
47+
mongodb-replica-set: rs-test
48+
- name: Run Maven Tests
49+
run: mvn -T 2 clean install -DskipTests

commons-datastore/commons-datastore-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.opencb.commons</groupId>
88
<artifactId>commons-datastore</artifactId>
9-
<version>4.2.1</version>
9+
<version>4.3.0</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

commons-datastore/commons-datastore-mongodb/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.opencb.commons</groupId>
88
<artifactId>commons-datastore</artifactId>
9-
<version>4.2.1</version>
9+
<version>4.3.0</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

@@ -23,7 +23,7 @@
2323
<dependency>
2424
<groupId>org.mongodb</groupId>
2525
<artifactId>mongo-java-driver</artifactId>
26-
<version>3.11.3</version>
26+
<version>3.12.10</version>
2727
</dependency>
2828
<dependency>
2929
<groupId>junit</groupId>

commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBCollection.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public class MongoDBCollection {
5858
public static final String SPARSE = "sparse";
5959
public static final String NAME = "index_name";
6060

61+
public static final String NO_CURSOR_TIMEOUT = "noCursorTimeout";
62+
6163
private MongoDBNativeQuery mongoDBNativeQuery;
6264
private QueryResultWriter<Object> queryResultWriter;
6365

commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBNativeQuery.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ public FindIterable<Document> nativeFind(ClientSession clientSession, Bson query
221221
findIterable.maxTime(options.getLong(QueryOptions.TIMEOUT), TimeUnit.MILLISECONDS);
222222
}
223223

224+
if (options != null && options.getBoolean(MongoDBCollection.NO_CURSOR_TIMEOUT)) {
225+
findIterable.noCursorTimeout(true);
226+
}
227+
224228
return findIterable;
225229
}
226230

0 commit comments

Comments
 (0)