File tree Expand file tree Collapse file tree 4 files changed +35
-6
lines changed
functional/com/mongodb/connection
unit/com/mongodb/connection Expand file tree Collapse file tree 4 files changed +35
-6
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ configure(subprojects.findAll { it.name != 'util' && it.name != 'mongo-java-driv
181
181
excludeCategories ' category.ReplicaSet'
182
182
}
183
183
if (project. buildingWith(' quicktest' )) {
184
- excludeCategories ' category.Slow '
184
+ excludeCategories ' category.SlowUnit '
185
185
}
186
186
}
187
187
@@ -201,6 +201,12 @@ configure(subprojects.findAll { it.name != 'util' && it.name != 'mongo-java-driv
201
201
testLogging { exceptionFormat = ' full' }
202
202
}
203
203
204
+ task testSlowUnit(type : Test ) {
205
+ useJUnit {
206
+ includeCategories ' category.SlowUnit'
207
+ }
208
+ }
209
+
204
210
gradle. taskGraph. whenReady { taskGraph ->
205
211
if (taskGraph. hasTask(testCoverage)) {
206
212
tasks. withType(Test ) { jacoco { enabled = true } }
Original file line number Diff line number Diff line change 16
16
17
17
package com.mongodb.connection
18
18
19
- import category.Slow
19
+ import category.SlowUnit
20
20
import com.mongodb.MongoSocketOpenException
21
21
import com.mongodb.MongoSocketReadTimeoutException
22
22
import com.mongodb.OperationFunctionalSpecification
@@ -35,7 +35,7 @@ import static com.mongodb.ClusterFixture.getPrimary
35
35
import static com.mongodb.ClusterFixture.getSslSettings
36
36
import static com.mongodb.connection.CommandHelper.executeCommand
37
37
38
- @Category (Slow )
38
+ @Category (SlowUnit )
39
39
class AsyncStreamTimeoutsSpecification extends OperationFunctionalSpecification {
40
40
41
41
static SocketSettings openSocketSettings = SocketSettings . builder(). connectTimeout(1 , TimeUnit . MILLISECONDS ). build();
Original file line number Diff line number Diff line change 17
17
package com.mongodb.connection
18
18
19
19
import category.Async
20
- import category.Slow
20
+ import category.SlowUnit
21
21
import com.mongodb.MongoInternalException
22
22
import com.mongodb.MongoNamespace
23
23
import com.mongodb.MongoSocketClosedException
@@ -577,7 +577,7 @@ class InternalStreamConnectionSpecification extends Specification {
577
577
}
578
578
}
579
579
580
- @Category (Slow )
580
+ @Category (SlowUnit )
581
581
def ' should have threadsafe connection pipelining' () {
582
582
given :
583
583
int threads = 10
@@ -612,7 +612,7 @@ class InternalStreamConnectionSpecification extends Specification {
612
612
pool. shutdown()
613
613
}
614
614
615
- @Category ([Async , Slow ])
615
+ @Category ([Async , SlowUnit ])
616
616
@IgnoreIf ({ javaVersion < 1.7 })
617
617
def ' should have threadsafe connection pipelining asynchronously' () {
618
618
given :
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2015 MongoDB, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package category ;
18
+
19
+ /**
20
+ * Marker for slow tests that do not need to be run against multiple versions or configurations of MongoDB.
21
+ */
22
+ public interface SlowUnit {
23
+ }
You can’t perform that action at this time.
0 commit comments