@@ -16,7 +16,7 @@ public class ConnectionTest {
1616 static int SECONDARY_PORT =28016 ;
1717 static int SECURED_PORT =28016 ;
1818
19- @ Test
19+ @ Test ( groups ={ "acceptance" })
2020 public void testConnection (){
2121 boolean rvalue = false ;
2222 try {
@@ -28,7 +28,7 @@ public void testConnection(){
2828 AssertJUnit .assertFalse ("Error Connecting" , rvalue );
2929 }
3030
31- @ Test
31+ @ Test ( groups ={ "acceptance" })
3232 public void testSecuredConnection () {
3333 boolean rvalue = false ;
3434 try {
@@ -40,7 +40,7 @@ public void testSecuredConnection() {
4040 AssertJUnit .assertFalse ("Error connecting with secured connection" ,rvalue );
4141 }
4242
43- @ Test
43+ @ Test ( groups ={ "acceptance" })
4444 public void testHostname () {
4545 boolean rvalue = false ;
4646 RqlConnection r ;
@@ -56,7 +56,7 @@ public void testHostname() {
5656 AssertJUnit .assertFalse ("Error Connecting" , rvalue );
5757 }
5858
59- @ Test
59+ @ Test ( groups ={ "acceptance" })
6060 public void testPort () {
6161 boolean rvalue = false ;
6262 RqlConnection r ;
@@ -72,78 +72,45 @@ public void testPort() {
7272 AssertJUnit .assertFalse ("Error Connecting" , rvalue );
7373 }
7474
75- @ Test
75+ @ Test ( groups ={ "acceptance" })
7676 public void testReconnect () {
7777 boolean rvalue = false ;
7878 RqlConnection r ;
7979 try {
8080 r = RqlConnection .connect ("localhost" ,PRIMARY_PORT );
8181 r .set_port (SECONDARY_PORT );
82- r .set_hostname (InetAddress . getLocalHost (). getCanonicalHostName () );
82+ r .set_hostname ("127.0.0.1" );
8383 r .close ();
8484 }
8585 catch (RqlDriverException e ) {
86+ System .out .println ("Driver Exception: " + e .getMessage ());
8687 rvalue = true ;
8788 }
88- catch (UnknownHostException e ) {
89- rvalue = true ;
90- }
91- AssertJUnit .assertTrue ("Error Connecting" , rvalue );
89+ AssertJUnit .assertFalse ("Error Connecting" , rvalue );
9290 }
9391
9492 /* Test the functionality of the ten minute Introduction */
95- @ Test
96- public void testDatabaseCreate () {
93+ @ Test ( groups ={ "demo" })
94+ public void testDatabaseActions () {
9795 boolean rvalue = false ;
9896 RqlConnection r ;
9997 try {
10098 r = RqlConnection .connect ("localhost" ,PRIMARY_PORT );
10199 //r.db_create('superheroes').run(conn)
102100 RqlCursor cursor = r .run (r .db_create ("superheroes" ));
101+ r .run (r .db_list ());
102+ r .run (r .db_drop ("superheroes" )).toString ();
103103 r .close ();
104104 }
105105 catch (RqlDriverException e ) {
106106 e .printStackTrace ();
107107 rvalue = true ;
108108 }
109- AssertJUnit .assertFalse ("Error Creating Database" , rvalue );
110- }
111-
112- @ Test
113- public void testDatabaseList () {
114- boolean rvalue = false ;
115- RqlConnection r ;
116- try {
117- r = RqlConnection .connect ("localhost" ,PRIMARY_PORT );
118- //r.db_list().run(conn)
119- r .run (r .db_list ());
120- r .close ();
121- }
122- catch (RqlDriverException e ) {
123- e .printStackTrace ();
124- rvalue = true ;
125- }
126- AssertJUnit .assertFalse ("Error Listing Databases" , rvalue );
127- }
128-
129- @ Test
130- public void testDatabaseDrop () {
131- boolean rvalue = false ;
132- RqlConnection r ;
133- try {
134- r = RqlConnection .connect ("localhost" ,PRIMARY_PORT );
135- //r.db_drop('superheroes').run(conn)
136- r .run (r .db_drop ("superheroes" )).toString ();
137- r .close ();
138- }
139- catch (RqlDriverException e ) {
140- e .printStackTrace ();
141- rvalue = true ;
142- }
143- AssertJUnit .assertFalse ("Error Droping Databases" , rvalue );
109+ AssertJUnit .assertFalse ("Error Manipulating Database" , rvalue );
144110 }
111+
145112
146- @ Test
113+ @ Test ( groups ={ "demo" })
147114 public void testTableCreate () {
148115 boolean rvalue = false ;
149116 RqlConnection r ;
@@ -161,17 +128,17 @@ public void testTableCreate() {
161128 }
162129 AssertJUnit .assertFalse ("Error Creating Table" , rvalue );
163130 }
164-
165- @ Test
131+
132+ @ Test ( groups ={ "demo" })
166133 public void testTableList () {
167134 boolean rvalue = false ;
168135 RqlConnection r ;
169136 try {
170137 r = RqlConnection .connect ("localhost" ,PRIMARY_PORT );
171138 // r.db('test').table_list().run(conn)
172- r .run (r .db_create ("test12345 " ));
173- r .run (r .db ("test12345 " ).table_list ());
174- r .run (r .db_drop ("test12345 " ));
139+ r .run (r .db_create ("test123456 " ));
140+ r .run (r .db ("test123456 " ).table_list ());
141+ r .run (r .db_drop ("test123456 " ));
175142 r .close ();
176143 }
177144 catch (RqlDriverException e ) {
@@ -181,37 +148,37 @@ public void testTableList() {
181148 AssertJUnit .assertFalse ("Error Listing Tables" , rvalue );
182149 }
183150
184- @ Test
151+ @ Test ( groups ={ "demo" })
185152 public void testTableDrop () {
186153 boolean rvalue = false ;
187154 RqlConnection r ;
188155 try {
189156 r = RqlConnection .connect ("localhost" ,PRIMARY_PORT );
190157 // r.db('test').table_drop('dc_universe').run(conn)
191- r .run (r .db_create ("test12345 " ));
192- r .run (r .db ("test12345 " ).table_create ("dc_universe" ));
193- r .run (r .db ("test12345 " ).table_drop ("dc_universe" ));
194- r .run (r .db_drop ("test12345 " ));
158+ r .run (r .db_create ("test1234567 " ));
159+ r .run (r .db ("test1234567 " ).table_create ("dc_universe" ));
160+ r .run (r .db ("test1234567 " ).table_drop ("dc_universe" ));
161+ r .run (r .db_drop ("test1234567 " ));
195162 r .close ();
196163 }
197164 catch (RqlDriverException e ) {
198165 e .printStackTrace ();
199166 rvalue = true ;
200167 }
201- AssertJUnit .assertFalse ("Error Droping Table" , rvalue );
168+ AssertJUnit .assertFalse ("Error Dropping Table" , rvalue );
202169 }
203170
204- @ Test
171+ @ Test ( groups ={ "demo" })
205172 public void testTable () {
206173 boolean rvalue = false ;
207174 RqlConnection r ;
208175 try {
209176 r = RqlConnection .connect ("localhost" ,PRIMARY_PORT );
210- r .run (r .db_create ("test123456 " ));
211- r .run (r .db ("test123456 " ).table_create ("dc_universe" ));
177+ r .run (r .db_create ("test12345678 " ));
178+ r .run (r .db ("test12345678 " ).table_create ("dc_universe" ));
212179 r .table ("dc_universe" );
213- r .run (r .db ("test123456 " ).table_drop ("dc_universe" ));
214- r .run (r .db_drop ("test123456 " ));
180+ r .run (r .db ("test12345678 " ).table_drop ("dc_universe" ));
181+ r .run (r .db_drop ("test12345678 " ));
215182 r .close ();
216183 }
217184 catch (RqlDriverException e ) {
0 commit comments