Skip to content

Commit 3046113

Browse files
author
mpv1989
committed
Add cluster tests
1 parent 0b55213 commit 3046113

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/test/java/com/arangodb/ArangoDatabaseTest.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import com.arangodb.entity.BaseDocument;
5555
import com.arangodb.entity.BaseEdgeDocument;
5656
import com.arangodb.entity.CollectionEntity;
57+
import com.arangodb.entity.CollectionPropertiesEntity;
5758
import com.arangodb.entity.CollectionType;
5859
import com.arangodb.entity.DatabaseEntity;
5960
import com.arangodb.entity.GraphEntity;
@@ -161,8 +162,9 @@ public void createCollectionWithNumberOfShardsAndShardKey() {
161162
new CollectionCreateOptions().numberOfShards(2).shardKeys("a"));
162163
assertThat(result, is(notNullValue()));
163164
assertThat(result.getId(), is(notNullValue()));
164-
assertThat(db.collection(COLLECTION_NAME).getProperties().getNumberOfShards(), is(2));
165-
assertThat(db.collection(COLLECTION_NAME).getProperties().getShardKeys().size(), is(1));
165+
final CollectionPropertiesEntity properties = db.collection(COLLECTION_NAME).getProperties();
166+
assertThat(properties.getNumberOfShards(), is(2));
167+
assertThat(properties.getShardKeys().size(), is(1));
166168
} finally {
167169
db.collection(COLLECTION_NAME).drop();
168170
}
@@ -178,8 +180,9 @@ public void createCollectionWithNumberOfShardsAndShardKeys() {
178180
new CollectionCreateOptions().numberOfShards(2).shardKeys("a", "b"));
179181
assertThat(result, is(notNullValue()));
180182
assertThat(result.getId(), is(notNullValue()));
181-
assertThat(db.collection(COLLECTION_NAME).getProperties().getNumberOfShards(), is(2));
182-
assertThat(db.collection(COLLECTION_NAME).getProperties().getShardKeys().size(), is(2));
183+
final CollectionPropertiesEntity properties = db.collection(COLLECTION_NAME).getProperties();
184+
assertThat(properties.getNumberOfShards(), is(2));
185+
assertThat(properties.getShardKeys().size(), is(2));
183186
} finally {
184187
db.collection(COLLECTION_NAME).drop();
185188
}

0 commit comments

Comments
 (0)