From 4764e12d99dfa817bd2f8779cbfb685c42d7c178 Mon Sep 17 00:00:00 2001 From: wusheng Date: Mon, 28 Nov 2016 15:05:45 +0800 Subject: [PATCH] sleep 1 millisecond stead of 1 namos, avoid thread resource contention. --- .../skywalking-storage/src/test/java/StorageThread.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/skywalking-storage-center/skywalking-storage/src/test/java/StorageThread.java b/skywalking-storage-center/skywalking-storage/src/test/java/StorageThread.java index 6dbbd02ba..9c4b85afe 100644 --- a/skywalking-storage-center/skywalking-storage/src/test/java/StorageThread.java +++ b/skywalking-storage-center/skywalking-storage/src/test/java/StorageThread.java @@ -23,7 +23,7 @@ public class StorageThread extends Thread { StorageThread(long count, CountDownLatch countDownLatch, int index) { listener = new MyStorageClientListener(); - client = new Client("127.0.0.1", 34000).newSpanStorageClient(listener); + client = new Client("10.128.34.248", 34000).newSpanStorageClient(listener); this.count = count; this.countDownLatch = countDownLatch; this.index = index; @@ -52,7 +52,10 @@ public class StorageThread extends Thread { cycle = 0; while(!listener.isCompleted){ - LockSupport.parkNanos(1); + try { + Thread.sleep(1L); + } catch (InterruptedException e) { + } } listener.begin(); ackSpanList.clear();