Skip to content

Commit

Permalink
lightened ExportS3PerformanceTest
Browse files Browse the repository at this point in the history
  • Loading branch information
vga91 committed Nov 25, 2022
1 parent 7f85b46 commit f9020d2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions core/src/test/java/apoc/export/ExportS3PerformanceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import apoc.export.csv.ExportCSV;
import apoc.graph.Graphs;
import apoc.util.TestUtil;
import apoc.util.Util;
import apoc.util.s3.S3BaseTest;
import com.amazonaws.services.s3.model.S3Object;
import org.junit.BeforeClass;
Expand All @@ -14,6 +15,7 @@
import java.io.IOException;
import java.time.Duration;
import java.time.Instant;
import java.util.stream.IntStream;

import static apoc.ApocConfig.APOC_EXPORT_FILE_ENABLED;
import static apoc.ApocConfig.apocConfig;
Expand Down Expand Up @@ -45,11 +47,8 @@ public static void setUp() throws Exception {
@Test
public void testExportAllCsvS3() throws Exception {
System.out.println("Data creation started.");
// create large data (> 100 MB)
for (int i=0; i<555000; i++) {
String query = String.format("CREATE (f:User1:User {name:'foo%d',age:%d,male:true,kids:['a','b','c']})-[:KNOWS]->(b:User {name:'bar%d',age:%d}),(c:User {age:12})", i, i, i, i );
db.executeTransactionally(query);
}
final String query = Util.readResourceFile("movies.cypher");
IntStream.range(0, 5000).forEach(__-> db.executeTransactionally(query));
System.out.println("Data creation finished.");

System.out.println("Test started.");
Expand Down

0 comments on commit f9020d2

Please sign in to comment.