fix test failures due to test order (2)
package com.tinkerpop.blueprints.impls.orient;
-import com.orientechnologies.orient.core.db.ODatabaseDocumentInternal;
-import com.orientechnologies.orient.core.db.ODatabaseSession;
-import com.orientechnologies.orient.core.db.ODatabaseType;
-import com.orientechnologies.orient.core.db.OrientDB;
-import com.orientechnologies.orient.core.db.OrientDBConfig;
-import com.orientechnologies.orient.core.exception.OSecurityException;
+import com.orientechnologies.orient.core.db.*;
import com.orientechnologies.orient.core.sql.executor.OResultSet;
import com.orientechnologies.orient.core.storage.OStorage;
-import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -81,10 +75,10 @@ public class OrientGraphFactoryEncryptionTest {
ODatabaseSession db = graphFactory.getDatabase();
- db.command("create class TestEncryption");
- db.command("insert into TestEncryption set name = 'Jay'");
+ db.command("create class shouldQueryDESEncryptedDatabase");
+ db.command("insert into shouldQueryDESEncryptedDatabase set name = 'Jay'");
- try (OResultSet result = db.query("select from TestEncryption")) {
+ try (OResultSet result = db.query("select from shouldQueryDESEncryptedDatabase")) {
assertThat(result).hasSize(1);
}
@@ -113,8 +107,8 @@ public class OrientGraphFactoryEncryptionTest {
ODatabaseSession db = graphFactory.getDatabase();
- db.command("create class TestEncryption");
- db.command("insert into TestEncryption set name = 'Jay'");
+ db.command("create class shouldFailWitWrongKey");
+ db.command("insert into shouldFailWitWrongKey set name = 'Jay'");
db.close();
OStorage storage = ((ODatabaseDocumentInternal) db).getStorage();
@@ -129,7 +123,7 @@ public class OrientGraphFactoryEncryptionTest {
graphFactory.setProperty(STORAGE_ENCRYPTION_KEY.getKey(), "T1JJRU5UREJfSVNfQ09PTA==");
db = graphFactory.getDatabase();
- try (OResultSet result = db.query("select from TestEncryption")) {
+ try (OResultSet result = db.query("select from shouldFailWitWrongKey")) {
assertThat(result).hasSize(1);
}
