Skip to content

Commit 33a86e5

Browse files
committed
Update tests.
1 parent 00e1024 commit 33a86e5

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

kilo-test/src/main/java/org/httprpc/kilo/test/BulkUploadService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public class BulkUploadService extends AbstractDatabaseService {
2828
private static final int BATCH_SIZE = 5000;
2929

3030
@RequestMethod("POST")
31-
@ResourcePath("upload")
3231
public void upload(List<Row> rows) throws SQLException {
3332
var queryBuilder = new QueryBuilder();
3433

@@ -43,7 +42,7 @@ public void upload(List<Row> rows) throws SQLException {
4342
}
4443

4544
@RequestMethod("POST")
46-
@ResourcePath("upload-batch")
45+
@ResourcePath("batch")
4746
public void uploadBatch(List<Row> rows) throws SQLException {
4847
var queryBuilder = new QueryBuilder();
4948

kilo-test/src/test/java/org/httprpc/kilo/test/BulkUploadServiceTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import java.util.Iterator;
2222

2323
public class BulkUploadServiceTest {
24+
private static final URI baseURI = URI.create("http://localhost:8080/kilo-test/");
25+
2426
public static class Rows implements Iterable<Row> {
2527
private int count;
2628

@@ -51,15 +53,13 @@ public Row next() {
5153
}
5254

5355
public static void main(String[] args) throws IOException {
54-
var baseURI = URI.create("http://localhost:8080/kilo-test/bulk-upload/");
55-
5656
var t0 = System.currentTimeMillis();
5757

58-
logTiming(baseURI, "upload", 15000, t0);
58+
logTiming(baseURI, "bulk-upload", 15000, t0);
5959

6060
var t1 = System.currentTimeMillis();
6161

62-
logTiming(baseURI, "upload-batch", 15000, t1);
62+
logTiming(baseURI, "bulk-upload/batch", 15000, t1);
6363
}
6464

6565
private static void logTiming(URI baseURI, String path, int count, long start) throws IOException {

kilo-test/src/test/java/org/httprpc/kilo/test/EmployeeServiceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
import java.util.List;
2222

2323
public class EmployeeServiceTest {
24-
public static void main(String[] args) throws IOException {
25-
var baseURI = URI.create("http://localhost:8080/kilo-test/");
24+
private static final URI baseURI = URI.create("http://localhost:8080/kilo-test/");
2625

26+
public static void main(String[] args) throws IOException {
2727
logTiming(baseURI, "employees");
2828
logTiming(baseURI, "employees/stream");
2929
}

0 commit comments

Comments
 (0)