File tree Expand file tree Collapse file tree 4 files changed +18
-12
lines changed Expand file tree Collapse file tree 4 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -502,6 +502,7 @@ public void testMapReduceInline(){
502
502
503
503
//If run against a replicaset this will verify that the inline map/reduce hits the secondary.
504
504
@ Test
505
+ @ SuppressWarnings ("deprecation" )
505
506
public void testMapReduceInlineSecondary () throws Exception {
506
507
Mongo mongo = new Mongo (Arrays .asList (new ServerAddress ("127.0.0.1" ), new ServerAddress ("127.0.0.1" , 27020 )));
507
508
DBCollection c = mongo .getDB (_db .getName ()).getCollection ( "imr2" );
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public void testUserPass(){
60
60
assertEquals ( "user" , u .getUsername () );
61
61
assertEquals ( "pass" , new String ( u .getPassword () ) );
62
62
}
63
-
63
+
64
64
@ Test ()
65
65
public void testUserPassAndPort (){
66
66
MongoURI u = new MongoURI ( "mongodb://user:pass@host:27011/bar" );
@@ -81,7 +81,7 @@ public void testUserPassAndMultipleHostsWithPort(){
81
81
assertEquals ( "pass" , new String ( u .getPassword () ) );
82
82
}
83
83
84
-
84
+
85
85
@ Test ()
86
86
public void testOptions (){
87
87
MongoURI uAmp = new MongoURI ( "mongodb://localhost/test?" +
@@ -101,6 +101,7 @@ public void testOptions(){
101
101
_testOpts ( uMixed ._options );
102
102
}
103
103
104
+ @ SuppressWarnings ("deprecation" )
104
105
private void _testOpts (MongoOptions uOpt ){
105
106
assertEquals ( uOpt .connectionsPerHost , 10 );
106
107
assertEquals ( uOpt .threadsAllowedToBlockForConnectionMultiplier , 5 );
Original file line number Diff line number Diff line change 23
23
public class ReplPairTest {
24
24
25
25
static class R extends Thread {
26
+ @ SuppressWarnings ("deprecation" )
26
27
R ( ServerAddress a ){
27
28
_a = a ;
28
29
_mongo = new Mongo (a );
29
30
_db = _mongo .getDB ( "test" );
30
31
_coll = _db .getCollection ( "foo" );
31
-
32
+
32
33
_coll .slaveOk ();
33
34
}
34
-
35
+
35
36
public void run (){
36
37
while ( true ){
37
38
try {
@@ -46,16 +47,17 @@ public void run(){
46
47
}
47
48
}
48
49
}
49
-
50
+
50
51
final ServerAddress _a ;
51
52
final Mongo _mongo ;
52
53
final DB _db ;
53
54
final DBCollection _coll ;
54
55
}
55
56
57
+ @ SuppressWarnings ("deprecation" )
56
58
public static void main ( String args [] )
57
59
throws Exception {
58
-
60
+
59
61
List <ServerAddress > addrs = new ArrayList <ServerAddress >();
60
62
addrs .add ( new ServerAddress ( "localhost" , 9998 ) );
61
63
addrs .add ( new ServerAddress ( "localhost" , 9999 ) );
@@ -69,7 +71,7 @@ public static void main( String args[] )
69
71
for ( ServerAddress a : addrs ){
70
72
new R (a ).start ();
71
73
}
72
-
74
+
73
75
while ( true ){
74
76
Thread .sleep ( 500 );
75
77
try {
Original file line number Diff line number Diff line change @@ -28,15 +28,16 @@ static void _sleep()
28
28
}
29
29
30
30
static class R extends Thread {
31
+ @ SuppressWarnings ("deprecation" )
31
32
R ( ServerAddress a ){
32
33
_a = a ;
33
34
_mongo = new Mongo (a );
34
35
_db = _mongo .getDB ( "test" );
35
36
_coll = _db .getCollection ( "foo" );
36
-
37
+
37
38
_coll .slaveOk ();
38
39
}
39
-
40
+
40
41
public void run (){
41
42
while ( true ){
42
43
try {
@@ -51,16 +52,17 @@ public void run(){
51
52
}
52
53
}
53
54
}
54
-
55
+
55
56
final ServerAddress _a ;
56
57
final Mongo _mongo ;
57
58
final DB _db ;
58
59
final DBCollection _coll ;
59
60
}
60
61
62
+ @ SuppressWarnings ("deprecation" )
61
63
public static void main ( String args [] )
62
64
throws Exception {
63
-
65
+
64
66
boolean rs = true ;
65
67
66
68
List <ServerAddress > addrs = new ArrayList <ServerAddress >();
@@ -81,7 +83,7 @@ public static void main( String args[] )
81
83
for ( ServerAddress a : addrs ){
82
84
new R (a ).start ();
83
85
}
84
-
86
+
85
87
while ( true ){
86
88
_sleep ();
87
89
try {
You can’t perform that action at this time.
0 commit comments