-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mykola Svishevskiy
committed
Jan 21, 2022
1 parent
d43ae6d
commit 5f99f6c
Showing
10 changed files
with
533 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
...test/java/com/playtika/janusgraph/aerospike/debuggrapdb/AerospikeDebugGraphCacheTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// Copyright 2017 JanusGraph Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package com.playtika.janusgraph.aerospike.debuggrapdb; | ||
|
||
import com.playtika.janusgraph.trace.DebugJanusGraph; | ||
import org.janusgraph.StorageSetup; | ||
import org.janusgraph.core.JanusGraphException; | ||
import org.janusgraph.diskstorage.configuration.WriteConfiguration; | ||
import org.janusgraph.graphdb.JanusGraphTest; | ||
import org.janusgraph.graphdb.database.StandardJanusGraph; | ||
import org.junit.ClassRule; | ||
import org.junit.Ignore; | ||
import org.junit.jupiter.api.Test; | ||
import org.testcontainers.containers.GenericContainer; | ||
|
||
import java.util.concurrent.ExecutionException; | ||
|
||
import static com.playtika.janusgraph.aerospike.AerospikeTestUtils.getAerospikeConfiguration; | ||
import static com.playtika.janusgraph.aerospike.AerospikeTestUtils.getAerospikeContainer; | ||
import static org.assertj.core.api.Assertions.assertThatThrownBy; | ||
|
||
public class AerospikeDebugGraphCacheTest extends JanusGraphTest { | ||
|
||
@ClassRule | ||
public static final GenericContainer container = getAerospikeContainer(); | ||
|
||
@Override | ||
public void open(WriteConfiguration config) { | ||
this.graph = (StandardJanusGraph) DebugJanusGraph.open(config); | ||
this.features = this.graph.getConfiguration().getStoreFeatures(); | ||
this.tx = this.graph.newTransaction(); | ||
this.mgmt = this.graph.openManagement(); | ||
} | ||
|
||
@Override | ||
public WriteConfiguration getConfiguration() { | ||
return StorageSetup.addPermanentCache(getAerospikeConfiguration(container)); | ||
} | ||
|
||
//TODO Investigate | ||
@Ignore | ||
@Test | ||
@Override | ||
public void testIndexUpdatesWithReindexAndRemove() throws InterruptedException, ExecutionException { | ||
} | ||
|
||
@Test | ||
@Override | ||
public void testLargeJointIndexRetrieval() { | ||
assertThatThrownBy(super::testLargeJointIndexRetrieval) | ||
.isInstanceOf(JanusGraphException.class) //Record too big | ||
.hasMessageContaining("Could not commit transaction due to exception during persistence"); | ||
} | ||
|
||
@Test | ||
@Override | ||
public void testVertexCentricQuery() { | ||
assertThatThrownBy(super::testVertexCentricQuery) | ||
.isInstanceOf(JanusGraphException.class) //Record too big | ||
.hasMessageContaining("Could not commit transaction due to exception during persistence"); | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...java/com/playtika/janusgraph/aerospike/debuggrapdb/AerospikeDebugGraphConcurrentTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright 2017 JanusGraph Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package com.playtika.janusgraph.aerospike.debuggrapdb; | ||
|
||
import com.playtika.janusgraph.trace.DebugJanusGraph; | ||
import org.janusgraph.TestCategory; | ||
import org.janusgraph.diskstorage.configuration.WriteConfiguration; | ||
import org.janusgraph.graphdb.JanusGraphConcurrentTest; | ||
import org.janusgraph.graphdb.database.StandardJanusGraph; | ||
import org.junit.ClassRule; | ||
import org.junit.jupiter.api.Tag; | ||
import org.testcontainers.containers.GenericContainer; | ||
|
||
import static com.playtika.janusgraph.aerospike.AerospikeTestUtils.getAerospikeConfiguration; | ||
import static com.playtika.janusgraph.aerospike.AerospikeTestUtils.getAerospikeContainer; | ||
|
||
@Tag(TestCategory.PERFORMANCE_TESTS) | ||
public class AerospikeDebugGraphConcurrentTest extends JanusGraphConcurrentTest { | ||
|
||
@Override | ||
public void open(WriteConfiguration config) { | ||
this.graph = (StandardJanusGraph) DebugJanusGraph.open(config); | ||
this.features = this.graph.getConfiguration().getStoreFeatures(); | ||
this.tx = this.graph.newTransaction(); | ||
this.mgmt = this.graph.openManagement(); | ||
} | ||
|
||
@ClassRule | ||
public static final GenericContainer container = getAerospikeContainer(); | ||
|
||
@Override | ||
public WriteConfiguration getConfiguration() { | ||
return getAerospikeConfiguration(container).getConfiguration(); | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
.../java/com/playtika/janusgraph/aerospike/debuggrapdb/AerospikeDebugGraphIterativeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Copyright 2017 JanusGraph Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package com.playtika.janusgraph.aerospike.debuggrapdb; | ||
|
||
import com.playtika.janusgraph.aerospike.AerospikeStoreManager; | ||
import com.playtika.janusgraph.trace.DebugJanusGraph; | ||
import org.janusgraph.diskstorage.BackendException; | ||
import org.janusgraph.diskstorage.configuration.BasicConfiguration; | ||
import org.janusgraph.diskstorage.configuration.WriteConfiguration; | ||
import org.janusgraph.diskstorage.keycolumnvalue.KeyColumnValueStoreManager; | ||
import org.janusgraph.graphdb.JanusGraphIterativeBenchmark; | ||
import org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration; | ||
import org.janusgraph.graphdb.database.StandardJanusGraph; | ||
import org.junit.ClassRule; | ||
import org.testcontainers.containers.GenericContainer; | ||
|
||
import static com.playtika.janusgraph.aerospike.AerospikeTestUtils.getAerospikeConfiguration; | ||
import static com.playtika.janusgraph.aerospike.AerospikeTestUtils.getAerospikeContainer; | ||
|
||
|
||
public class AerospikeDebugGraphIterativeTest extends JanusGraphIterativeBenchmark { | ||
|
||
@ClassRule | ||
public static final GenericContainer container = getAerospikeContainer(); | ||
|
||
@Override | ||
public void open(WriteConfiguration config) { | ||
this.graph = (StandardJanusGraph) DebugJanusGraph.open(config); | ||
this.features = this.graph.getConfiguration().getStoreFeatures(); | ||
this.tx = this.graph.newTransaction(); | ||
this.mgmt = this.graph.openManagement(); | ||
} | ||
|
||
@Override | ||
public WriteConfiguration getConfiguration() { | ||
return getAerospikeConfiguration(container).getConfiguration(); | ||
} | ||
|
||
@Override | ||
public KeyColumnValueStoreManager openStorageManager() throws BackendException { | ||
return new AerospikeStoreManager(new BasicConfiguration( | ||
GraphDatabaseConfiguration.ROOT_NS, | ||
getConfiguration(), | ||
BasicConfiguration.Restriction.NONE)); | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...m/playtika/janusgraph/aerospike/debuggrapdb/AerospikeDebugGraphPerformanceMemoryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2017 JanusGraph Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package com.playtika.janusgraph.aerospike.debuggrapdb; | ||
|
||
import com.playtika.janusgraph.trace.DebugJanusGraph; | ||
import org.janusgraph.diskstorage.configuration.WriteConfiguration; | ||
import org.janusgraph.graphdb.JanusGraphPerformanceMemoryTest; | ||
import org.janusgraph.graphdb.database.StandardJanusGraph; | ||
import org.junit.ClassRule; | ||
import org.testcontainers.containers.GenericContainer; | ||
|
||
import static com.playtika.janusgraph.aerospike.AerospikeTestUtils.getAerospikeConfiguration; | ||
import static com.playtika.janusgraph.aerospike.AerospikeTestUtils.getAerospikeContainer; | ||
|
||
|
||
public class AerospikeDebugGraphPerformanceMemoryTest extends JanusGraphPerformanceMemoryTest { | ||
@ClassRule | ||
public static final GenericContainer container = getAerospikeContainer(); | ||
|
||
@Override | ||
public void open(WriteConfiguration config) { | ||
this.graph = (StandardJanusGraph) DebugJanusGraph.open(config); | ||
this.features = this.graph.getConfiguration().getStoreFeatures(); | ||
this.tx = this.graph.newTransaction(); | ||
this.mgmt = this.graph.openManagement(); | ||
} | ||
|
||
@Override | ||
public WriteConfiguration getConfiguration() { | ||
return getAerospikeConfiguration(container).getConfiguration(); | ||
} | ||
|
||
} |
72 changes: 72 additions & 0 deletions
72
.../src/test/java/com/playtika/janusgraph/aerospike/debuggrapdb/AerospikeDebugGraphTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// Copyright 2017 JanusGraph Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package com.playtika.janusgraph.aerospike.debuggrapdb; | ||
|
||
import com.playtika.janusgraph.trace.DebugJanusGraph; | ||
import org.janusgraph.core.JanusGraphException; | ||
import org.janusgraph.diskstorage.configuration.WriteConfiguration; | ||
import org.janusgraph.graphdb.JanusGraphTest; | ||
import org.janusgraph.graphdb.database.StandardJanusGraph; | ||
import org.junit.ClassRule; | ||
import org.junit.Ignore; | ||
import org.junit.jupiter.api.Test; | ||
import org.testcontainers.containers.GenericContainer; | ||
|
||
import static com.playtika.janusgraph.aerospike.AerospikeTestUtils.getAerospikeConfiguration; | ||
import static com.playtika.janusgraph.aerospike.AerospikeTestUtils.getAerospikeContainer; | ||
import static org.assertj.core.api.Assertions.assertThatThrownBy; | ||
|
||
public class AerospikeDebugGraphTest extends JanusGraphTest { | ||
|
||
@ClassRule | ||
public static final GenericContainer container = getAerospikeContainer(); | ||
|
||
@Override | ||
public void open(WriteConfiguration config) { | ||
this.graph = (StandardJanusGraph) DebugJanusGraph.open(config); | ||
this.features = this.graph.getConfiguration().getStoreFeatures(); | ||
this.tx = this.graph.newTransaction(); | ||
this.mgmt = this.graph.openManagement(); | ||
} | ||
|
||
@Override | ||
public WriteConfiguration getConfiguration() { | ||
return getAerospikeConfiguration(container).getConfiguration(); | ||
} | ||
|
||
//TODO Investigate | ||
@Ignore | ||
@Test | ||
@Override | ||
public void testIndexUpdatesWithReindexAndRemove() { | ||
} | ||
|
||
@Test | ||
@Override | ||
public void testLargeJointIndexRetrieval() { | ||
assertThatThrownBy(super::testLargeJointIndexRetrieval) | ||
.isInstanceOf(JanusGraphException.class) //Record too big | ||
.hasMessageContaining("Could not commit transaction due to exception during persistence"); | ||
} | ||
|
||
@Test | ||
@Override | ||
public void testVertexCentricQuery() { | ||
assertThatThrownBy(super::testVertexCentricQuery) | ||
.isInstanceOf(JanusGraphException.class) //Record too big | ||
.hasMessageContaining("Could not commit transaction due to exception during persistence"); | ||
} | ||
|
||
} |
83 changes: 83 additions & 0 deletions
83
...d/src/test/java/com/playtika/janusgraph/aerospike/debuggrapdb/AerospikeDebugOLAPTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
// Copyright 2017 JanusGraph Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package com.playtika.janusgraph.aerospike.debuggrapdb; | ||
|
||
import com.playtika.janusgraph.trace.DebugJanusGraph; | ||
import org.janusgraph.diskstorage.configuration.WriteConfiguration; | ||
import org.janusgraph.graphdb.database.StandardJanusGraph; | ||
import org.janusgraph.olap.OLAPTest; | ||
import org.junit.ClassRule; | ||
import org.junit.Ignore; | ||
import org.junit.jupiter.api.Test; | ||
import org.testcontainers.containers.GenericContainer; | ||
|
||
import static com.playtika.janusgraph.aerospike.AerospikeTestUtils.getAerospikeConfiguration; | ||
import static com.playtika.janusgraph.aerospike.AerospikeTestUtils.getAerospikeContainer; | ||
|
||
|
||
//TODO https://github.com/JanusGraph/janusgraph/issues/1527 | ||
//TODO wait for https://github.com/JanusGraph/janusgraph/issues/1524 | ||
public class AerospikeDebugOLAPTest extends OLAPTest { | ||
@ClassRule | ||
public static final GenericContainer container = getAerospikeContainer(); | ||
|
||
@Override | ||
public void open(WriteConfiguration config) { | ||
this.graph = (StandardJanusGraph) DebugJanusGraph.open(config); | ||
this.features = this.graph.getConfiguration().getStoreFeatures(); | ||
this.tx = this.graph.newTransaction(); | ||
this.mgmt = this.graph.openManagement(); | ||
} | ||
|
||
@Override | ||
public WriteConfiguration getConfiguration() { | ||
return getAerospikeConfiguration(container).getConfiguration(); | ||
} | ||
|
||
//TODO | ||
@Ignore | ||
@Override | ||
@Test | ||
public void degreeCounting() { | ||
} | ||
|
||
//Throws java.lang.OutOfMemoryError: Java heap space | ||
@Ignore | ||
@Override | ||
@Test | ||
public void degreeCountingDistance() { | ||
} | ||
|
||
//TODO | ||
@Ignore | ||
@Override | ||
@Test | ||
public void testVertexScan() { | ||
} | ||
|
||
//TODO | ||
@Ignore | ||
@Override | ||
@Test | ||
public void testShortestDistance() { | ||
} | ||
|
||
//TODO | ||
@Ignore | ||
@Override | ||
@Test | ||
public void testPageRank() { | ||
} | ||
} |
Oops, something went wrong.