-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
extended-it/src/test/java/apoc/monitor/StoreInfoProcedureEnterpriseTest.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 @@ | ||
package apoc.monitor; | ||
|
||
import apoc.util.Neo4jContainerExtension; | ||
import apoc.util.TestContainerUtil; | ||
import org.junit.AfterClass; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
|
||
import org.neo4j.driver.Session; | ||
|
||
import java.util.List; | ||
|
||
import static apoc.util.TestContainerUtil.createEnterpriseDB; | ||
import static apoc.util.TestContainerUtil.testCall; | ||
import static org.junit.Assert.assertNotNull; | ||
|
||
public class StoreInfoProcedureEnterpriseTest { | ||
private static Neo4jContainerExtension neo4jContainer; | ||
private static Session session; | ||
|
||
@BeforeClass | ||
public static void setUp() throws Exception { | ||
neo4jContainer = createEnterpriseDB(List.of(TestContainerUtil.ApocPackage.EXTENDED), true); | ||
neo4jContainer.start(); | ||
|
||
session = neo4jContainer.getSession(); | ||
} | ||
|
||
@AfterClass | ||
public static void tearDown() { | ||
session.close(); | ||
neo4jContainer.close(); | ||
} | ||
|
||
@Test | ||
public void testGetStoreInfo() { | ||
testCall(session, "CALL apoc.monitor.store()", (row) -> { | ||
assertNotNull(row.get("logSize")); | ||
assertNotNull(row.get("stringStoreSize")); | ||
assertNotNull(row.get("arrayStoreSize")); | ||
assertNotNull(row.get("nodeStoreSize")); | ||
assertNotNull(row.get("relStoreSize")); | ||
assertNotNull(row.get("propStoreSize")); | ||
assertNotNull(row.get("totalStoreSize")); | ||
}); | ||
} | ||
} |
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