@@ -46,14 +46,10 @@ public class ArangoDriverAdminTest extends BaseTest {
4646
4747 private static Logger logger = LoggerFactory .getLogger (ArangoDriverAdminTest .class );
4848
49- public ArangoDriverAdminTest (ArangoConfigure configure , ArangoDriver driver ) {
50- super (configure , driver );
51- }
52-
5349 @ Test
5450 public void test_version () throws ArangoException {
5551
56- ArangoVersion version = driver .getVersion ();
52+ final ArangoVersion version = driver .getVersion ();
5753 assertEquals ("arango" , version .getServer ());
5854 assertNotNull (version .getVersion ());
5955 assertTrue (version .getVersion ().startsWith ("2." ) || version .getVersion ().startsWith ("3." ));
@@ -62,7 +58,7 @@ public void test_version() throws ArangoException {
6258 @ Test
6359 public void test_time () throws ArangoException {
6460
65- ArangoUnixTime time = driver .getTime ();
61+ final ArangoUnixTime time = driver .getTime ();
6662 assertThat (time .getSecond (), is (not (0 )));
6763 assertThat (time .getMicrosecond (), is (not (0 )));
6864
@@ -75,14 +71,14 @@ public void test_time() throws ArangoException {
7571 @ Test
7672 public void test_log_all () throws ArangoException {
7773
78- AdminLogEntity entity = driver .getServerLog (null , null , null , null , null , null , null );
74+ final AdminLogEntity entity = driver .getServerLog (null , null , null , null , null , null , null );
7975
8076 assertThat (entity , is (notNullValue ()));
8177 assertThat (entity .getTotalAmount (), is (not (0 )));
8278 assertThat (entity .getLogs ().size (), is (entity .getTotalAmount ()));
8379
8480 // debug
85- for (AdminLogEntity .LogEntry log : entity .getLogs ()) {
81+ for (final AdminLogEntity .LogEntry log : entity .getLogs ()) {
8682 logger .debug ("%d\t %d\t %tF %<tT\t %s%n" , log .getLid (), log .getLevel (), log .getTimestamp (), log .getText ());
8783 }
8884
@@ -91,11 +87,11 @@ public void test_log_all() throws ArangoException {
9187 @ Test
9288 public void test_log_text () throws ArangoException {
9389
94- AdminLogEntity entity = driver .getServerLog (null , null , null , null , null , null , "Fun" );
90+ final AdminLogEntity entity = driver .getServerLog (null , null , null , null , null , null , "Fun" );
9591
9692 assertThat (entity , is (notNullValue ()));
9793 // debug
98- for (AdminLogEntity .LogEntry log : entity .getLogs ()) {
94+ for (final AdminLogEntity .LogEntry log : entity .getLogs ()) {
9995 logger .debug ("%d\t %d\t %tF %<tT\t %s%n" , log .getLid (), log .getLevel (), log .getTimestamp (), log .getText ());
10096 }
10197
@@ -106,10 +102,10 @@ public void test_log_text() throws ArangoException {
106102 @ Test
107103 public void test_statistics () throws ArangoException {
108104
109- StatisticsEntity stat = driver .getStatistics ();
105+ final StatisticsEntity stat = driver .getStatistics ();
110106
111107 // debug
112- Gson gson = new Gson ();
108+ final Gson gson = new Gson ();
113109 assertNotNull (gson .toJson (stat ));
114110 assertNotNull (gson .toJson (stat .getSystem ()));
115111 assertNotNull (gson .toJson (stat .getClient ()));
@@ -120,10 +116,10 @@ public void test_statistics() throws ArangoException {
120116 @ Test
121117 public void test_statistics_description () throws ArangoException {
122118
123- StatisticsDescriptionEntity desc = driver .getStatisticsDescription ();
119+ final StatisticsDescriptionEntity desc = driver .getStatisticsDescription ();
124120
125121 // debug
126- Gson gson = new Gson ();
122+ final Gson gson = new Gson ();
127123 assertNotNull (gson .toJson (desc ));
128124 assertNotNull (gson .toJson (desc .getGroups ()));
129125 assertNotNull (gson .toJson (desc .getFigures ()));
@@ -132,7 +128,7 @@ public void test_statistics_description() throws ArangoException {
132128 @ Test
133129 public void test_reload_routing () throws ArangoException {
134130
135- DefaultEntity entity = driver .reloadRouting ();
131+ final DefaultEntity entity = driver .reloadRouting ();
136132 assertThat (entity .getStatusCode (), is (200 ));
137133 assertThat (entity .isError (), is (false ));
138134
@@ -141,7 +137,7 @@ public void test_reload_routing() throws ArangoException {
141137 @ Test
142138 public void test_execute_do_nothing () throws ArangoException {
143139
144- DefaultEntity entity = driver .executeScript ("" );
140+ final DefaultEntity entity = driver .executeScript ("" );
145141 assertThat (entity .isError (), is (false ));
146142 assertThat (entity .getCode (), is (200 ));
147143 assertThat (entity .getStatusCode (), is (200 ));
@@ -151,7 +147,7 @@ public void test_execute_do_nothing() throws ArangoException {
151147 @ Test
152148 public void test_execute () throws ArangoException {
153149
154- DefaultEntity entity = driver .executeScript (
150+ final DefaultEntity entity = driver .executeScript (
155151 "var db = require(\" internal\" ).db; cols = db._collections();\n " + "len = cols.length;\n " );
156152 assertThat (entity .isError (), is (false ));
157153 assertThat (entity .getCode (), is (200 ));
@@ -162,7 +158,7 @@ public void test_execute() throws ArangoException {
162158 @ Test
163159 public void test_execute_delete_collection () throws ArangoException {
164160
165- DefaultEntity entity1 = driver
161+ final DefaultEntity entity1 = driver
166162 .executeScript ("var db = require(\" internal\" ).db; db._drop(\" " + "col-execute-delete-test" + "\" )" );
167163 assertThat (entity1 .isError (), is (false ));
168164 assertThat (entity1 .getCode (), is (200 ));
@@ -171,7 +167,7 @@ public void test_execute_delete_collection() throws ArangoException {
171167 driver .createCollection ("col-execute-delete-test" );
172168 driver .getCollection ("col-execute-delete-test" );
173169
174- DefaultEntity entity2 = driver
170+ final DefaultEntity entity2 = driver
175171 .executeScript ("var db = require(\" internal\" ).db; db._drop(\" " + "col-execute-delete-test" + "\" )" );
176172 assertThat (entity2 .isError (), is (false ));
177173 assertThat (entity2 .getCode (), is (200 ));
@@ -180,7 +176,7 @@ public void test_execute_delete_collection() throws ArangoException {
180176 try {
181177 driver .getCollection ("col-execute-delete-test" );
182178 fail ();
183- } catch (ArangoException e ) {
179+ } catch (final ArangoException e ) {
184180 assertThat (e .getCode (), is (404 ));
185181 assertThat (e .getErrorNumber (), is (1203 ));
186182 }
@@ -191,8 +187,8 @@ public void test_execute_error() throws ArangoException {
191187 try {
192188 driver .executeScript ("xxx" );
193189 fail ();
194- } catch (ArangoException e ) {
195- String t = "Internal Server Error: JavaScript exception in file 'undefined' at 1,14: ReferenceError: xxx is not defined\n "
190+ } catch (final ArangoException e ) {
191+ final String t = "Internal Server Error: JavaScript exception in file 'undefined' at 1,14: ReferenceError: xxx is not defined\n "
196192 + "!(function() {xxx}());\n " + "! ^\n "
197193 + "stacktrace: ReferenceError: xxx is not defined\n " ;
198194 assertThat (e .getErrorMessage (), startsWith (t ));
0 commit comments