Skip to content

Commit 0278b0b

Browse files
author
mpv1989
committed
Add cluster tests
1 parent fe3d05e commit 0278b0b

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
@@ -51,6 +51,7 @@
5151
import com.arangodb.entity.BaseDocument;
5252
import com.arangodb.entity.BaseEdgeDocument;
5353
import com.arangodb.entity.CollectionEntity;
54+
import com.arangodb.entity.CollectionPropertiesEntity;
5455
import com.arangodb.entity.CollectionType;
5556
import com.arangodb.entity.DatabaseEntity;
5657
import com.arangodb.entity.GraphEntity;
@@ -153,8 +154,9 @@ public void createCollectionWithNumberOfShardsAndShardKey() {
153154
new CollectionCreateOptions().numberOfShards(2).shardKeys("a"));
154155
assertThat(result, is(notNullValue()));
155156
assertThat(result.getId(), is(notNullValue()));
156-
assertThat(db.collection(COLLECTION_NAME).getProperties().getNumberOfShards(), is(2));
157-
assertThat(db.collection(COLLECTION_NAME).getProperties().getShardKeys().size(), is(1));
157+
final CollectionPropertiesEntity properties = db.collection(COLLECTION_NAME).getProperties();
158+
assertThat(properties.getNumberOfShards(), is(2));
159+
assertThat(properties.getShardKeys().size(), is(1));
158160
} finally {
159161
db.collection(COLLECTION_NAME).drop();
160162
}
@@ -170,8 +172,9 @@ public void createCollectionWithNumberOfShardsAndShardKeys() {
170172
new CollectionCreateOptions().numberOfShards(2).shardKeys("a", "b"));
171173
assertThat(result, is(notNullValue()));
172174
assertThat(result.getId(), is(notNullValue()));
173-
assertThat(db.collection(COLLECTION_NAME).getProperties().getNumberOfShards(), is(2));
174-
assertThat(db.collection(COLLECTION_NAME).getProperties().getShardKeys().size(), is(2));
175+
final CollectionPropertiesEntity properties = db.collection(COLLECTION_NAME).getProperties();
176+
assertThat(properties.getNumberOfShards(), is(2));
177+
assertThat(properties.getShardKeys().size(), is(2));
175178
} finally {
176179
db.collection(COLLECTION_NAME).drop();
177180
}

0 commit comments

Comments
 (0)