Skip to content

Commit 91ac3a8

Browse files
author
DvirDukhan
committed
added runtime exceptions
1 parent ea019e4 commit 91ac3a8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/test/java/com/redislabs/redisgraph/RedisGraphAPITest.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.redislabs.redisgraph.graph_entities.Property;
1313
import com.redislabs.redisgraph.impl.api.RedisGraph;
1414
import com.redislabs.redisgraph.impl.resultset.ResultSetImpl;
15+
import jdk.nashorn.internal.ir.annotations.Ignore;
1516
import org.junit.After;
1617
import org.junit.Assert;
1718
import org.junit.Before;
@@ -152,10 +153,13 @@ public void testIndex() {
152153
Assert.assertFalse(createIndexResult.hasNext());
153154
Assert.assertEquals(1, createIndexResult.getStatistics().indicesAdded());
154155

155-
ResultSet failCreateIndexResult = api.query("social", "CREATE INDEX ON :person(age1)");
156-
Assert.assertFalse(failCreateIndexResult.hasNext());
157-
Assert.assertNull(failCreateIndexResult.getStatistics().getStringValue(Label.INDICES_ADDED));
158-
Assert.assertEquals(0, failCreateIndexResult.getStatistics().indicesAdded());
156+
// since RediSearch as index, those action are allowed
157+
ResultSet createNonExistingIndexResult = api.query("social", "CREATE INDEX ON :person(age1)");
158+
Assert.assertFalse(createNonExistingIndexResult.hasNext());
159+
Assert.assertNotNull(createNonExistingIndexResult.getStatistics().getStringValue(Label.INDICES_ADDED));
160+
Assert.assertEquals(1, createNonExistingIndexResult.getStatistics().indicesAdded());
161+
162+
159163
}
160164

161165
@Test

0 commit comments

Comments
 (0)