From 782bd6d99879212b7578fa19aa7e26146c1ca252 Mon Sep 17 00:00:00 2001 From: zzt Date: Mon, 10 Sep 2018 15:08:43 +0800 Subject: [PATCH] fix test & config file. --- src/main/resources/config.yml | 4 ++-- .../zzt93/syncer/common/thread/WaitingAckHookTest.java | 8 +++----- .../pipeline/common/ElasticsearchConnectionTest.java | 3 +-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 7610c6ac..ffb08b57 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -4,7 +4,7 @@ syncer: input: max-retry: 5 input-meta: - last-run-metadata-dir: //Users/xiong/data/syncer/input/last_position/ + last-run-metadata-dir: /data/syncer/input/last_position/ filter: worker: 12 @@ -14,4 +14,4 @@ syncer: batch: worker: 2 output-meta: - failure-log-dir: //Users/xiong/data/syncer/output/failure/ + failure-log-dir: /data/syncer/output/failure/ diff --git a/src/test/java/com/github/zzt93/syncer/common/thread/WaitingAckHookTest.java b/src/test/java/com/github/zzt93/syncer/common/thread/WaitingAckHookTest.java index 125404c2..b18a987c 100644 --- a/src/test/java/com/github/zzt93/syncer/common/thread/WaitingAckHookTest.java +++ b/src/test/java/com/github/zzt93/syncer/common/thread/WaitingAckHookTest.java @@ -9,19 +9,17 @@ public class WaitingAckHookTest { public void setUp() throws Exception { } - @Test public void exit() { Runtime.getRuntime().addShutdownHook(new Thread(()-> System.out.println("exit"))); System.exit(0); } - @Test public void exitMulti() { - // deadlock Runtime.getRuntime().addShutdownHook(new Thread(()-> { System.out.println("exit"); - System.exit(0); - System.out.println("exit2"); + // deadlock +// System.exit(0); +// System.out.println("exit2"); })); System.exit(0); } diff --git a/src/test/java/com/github/zzt93/syncer/config/pipeline/common/ElasticsearchConnectionTest.java b/src/test/java/com/github/zzt93/syncer/config/pipeline/common/ElasticsearchConnectionTest.java index 795cd003..4d72fb13 100644 --- a/src/test/java/com/github/zzt93/syncer/config/pipeline/common/ElasticsearchConnectionTest.java +++ b/src/test/java/com/github/zzt93/syncer/config/pipeline/common/ElasticsearchConnectionTest.java @@ -20,7 +20,6 @@ public class ElasticsearchConnectionTest { /** * https://discuss.elastic.co/t/java-api-plainless-script-indexof-give-wrong-answer/139016/7 */ - @Test public void scriptIndexOf() throws Exception { ElasticsearchConnection elasticsearchConnection = new ElasticsearchConnection(); elasticsearchConnection.setClusterName("searcher-integration"); @@ -67,7 +66,7 @@ private UpdateRequestBuilder updateRequest(AbstractClient client, Script meta) { } @Test - public void name() throws Exception { + public void name() { ArrayList l = Lists.newArrayList(1L, 2L); System.out.println(l.indexOf(1)); System.out.println(l.indexOf(1L));