Skip to content

Commit 7b4a1e3

Browse files
author
Mark
committed
fixed transaction test
1 parent 0a0bfce commit 7b4a1e3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/test/java/com/arangodb/ArangoDriverTransactionTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,23 +157,24 @@ public void test_Transaction() throws ArangoException {
157157

158158
@Test
159159
public void allowImplicit() throws ArangoException {
160-
TransactionEntity transaction = driver
160+
final TransactionEntity transaction = driver
161161
.createTransaction("function (params) {" + "var db = require('internal').db;"
162162
+ "return {'a':db.someCollection.all().toArray()[0], 'b':db.someOtherCollection.all().toArray()[0]};"
163163
+ "}");
164164
transaction.addReadCollection(SOME_COLLECTION);
165165
{
166-
TransactionResultEntity result = driver.executeTransaction(transaction);
166+
final TransactionResultEntity result = driver.executeTransaction(transaction);
167167
assertThat(result.getStatusCode(), is(200));
168168
assertThat(result.getCode(), is(200));
169169
assertThat(result.isError(), is(false));
170170
}
171+
driver.deleteQueryCache();
171172
{
172173
transaction.setAllowImplicit(false);
173174
try {
174175
driver.executeTransaction(transaction);
175176
Assert.fail();
176-
} catch (ArangoException e) {
177+
} catch (final ArangoException e) {
177178
final BaseEntity result = e.getEntity();
178179
assertThat(result.getStatusCode(), is(400));
179180
assertThat(result.getCode(), is(400));

0 commit comments

Comments
 (0)