Skip to content

Commit

Permalink
lightened ExportS3PerformanceTest
Browse files Browse the repository at this point in the history
  • Loading branch information
vga91 committed Nov 28, 2022
1 parent 5d648ab commit 8f75d31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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
2 changes: 1 addition & 1 deletion test-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dependencies {
implementation group: 'org.neo4j', name: 'neo4j-io', version: neo4jVersionEffective, classifier: "tests"
implementation group: 'org.gradle', name: 'gradle-tooling-api', version: '7.2'
implementation group: 'org.jetbrains', name: 'annotations', version: "17.0.0"
implementation group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.270'
implementation group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.12.348'
}


Expand Down

0 comments on commit 8f75d31

Please sign in to comment.