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(){
502502
503503 //If run against a replicaset this will verify that the inline map/reduce hits the secondary.
504504 @ Test
505+ @ SuppressWarnings ("deprecation" )
505506 public void testMapReduceInlineSecondary () throws Exception {
506507 Mongo mongo = new Mongo (Arrays .asList (new ServerAddress ("127.0.0.1" ), new ServerAddress ("127.0.0.1" , 27020 )));
507508 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(){
6060 assertEquals ( "user" , u .getUsername () );
6161 assertEquals ( "pass" , new String ( u .getPassword () ) );
6262 }
63-
63+
6464 @ Test ()
6565 public void testUserPassAndPort (){
6666 MongoURI u = new MongoURI ( "mongodb://user:pass@host:27011/bar" );
@@ -81,7 +81,7 @@ public void testUserPassAndMultipleHostsWithPort(){
8181 assertEquals ( "pass" , new String ( u .getPassword () ) );
8282 }
8383
84-
84+
8585 @ Test ()
8686 public void testOptions (){
8787 MongoURI uAmp = new MongoURI ( "mongodb://localhost/test?" +
@@ -101,6 +101,7 @@ public void testOptions(){
101101 _testOpts ( uMixed ._options );
102102 }
103103
104+ @ SuppressWarnings ("deprecation" )
104105 private void _testOpts (MongoOptions uOpt ){
105106 assertEquals ( uOpt .connectionsPerHost , 10 );
106107 assertEquals ( uOpt .threadsAllowedToBlockForConnectionMultiplier , 5 );
Original file line number Diff line number Diff line change 2323public class ReplPairTest {
2424
2525 static class R extends Thread {
26+ @ SuppressWarnings ("deprecation" )
2627 R ( ServerAddress a ){
2728 _a = a ;
2829 _mongo = new Mongo (a );
2930 _db = _mongo .getDB ( "test" );
3031 _coll = _db .getCollection ( "foo" );
31-
32+
3233 _coll .slaveOk ();
3334 }
34-
35+
3536 public void run (){
3637 while ( true ){
3738 try {
@@ -46,16 +47,17 @@ public void run(){
4647 }
4748 }
4849 }
49-
50+
5051 final ServerAddress _a ;
5152 final Mongo _mongo ;
5253 final DB _db ;
5354 final DBCollection _coll ;
5455 }
5556
57+ @ SuppressWarnings ("deprecation" )
5658 public static void main ( String args [] )
5759 throws Exception {
58-
60+
5961 List <ServerAddress > addrs = new ArrayList <ServerAddress >();
6062 addrs .add ( new ServerAddress ( "localhost" , 9998 ) );
6163 addrs .add ( new ServerAddress ( "localhost" , 9999 ) );
@@ -69,7 +71,7 @@ public static void main( String args[] )
6971 for ( ServerAddress a : addrs ){
7072 new R (a ).start ();
7173 }
72-
74+
7375 while ( true ){
7476 Thread .sleep ( 500 );
7577 try {
Original file line number Diff line number Diff line change @@ -28,15 +28,16 @@ static void _sleep()
2828 }
2929
3030 static class R extends Thread {
31+ @ SuppressWarnings ("deprecation" )
3132 R ( ServerAddress a ){
3233 _a = a ;
3334 _mongo = new Mongo (a );
3435 _db = _mongo .getDB ( "test" );
3536 _coll = _db .getCollection ( "foo" );
36-
37+
3738 _coll .slaveOk ();
3839 }
39-
40+
4041 public void run (){
4142 while ( true ){
4243 try {
@@ -51,16 +52,17 @@ public void run(){
5152 }
5253 }
5354 }
54-
55+
5556 final ServerAddress _a ;
5657 final Mongo _mongo ;
5758 final DB _db ;
5859 final DBCollection _coll ;
5960 }
6061
62+ @ SuppressWarnings ("deprecation" )
6163 public static void main ( String args [] )
6264 throws Exception {
63-
65+
6466 boolean rs = true ;
6567
6668 List <ServerAddress > addrs = new ArrayList <ServerAddress >();
@@ -81,7 +83,7 @@ public static void main( String args[] )
8183 for ( ServerAddress a : addrs ){
8284 new R (a ).start ();
8385 }
84-
86+
8587 while ( true ){
8688 _sleep ();
8789 try {
You can’t perform that action at this time.
0 commit comments