mirror of https://github.com/apache/druid.git
add flush timeout to emitter test (#8963)
This commit is contained in:
parent
a5b40a6099
commit
923c003213
|
@ -81,6 +81,12 @@ public class HttpEmitterConfig extends BaseHttpEmittingConfig
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Builder setFlushTimeout(long flushTimeout)
|
||||||
|
{
|
||||||
|
this.flushTimeOut = flushTimeout;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Builder setFlushCount(int flushCount)
|
public Builder setFlushCount(int flushCount)
|
||||||
{
|
{
|
||||||
this.flushCount = flushCount;
|
this.flushCount = flushCount;
|
||||||
|
|
|
@ -52,6 +52,7 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
@ -117,6 +118,7 @@ public class EmitterTest
|
||||||
{
|
{
|
||||||
HttpEmitterConfig config = new HttpEmitterConfig.Builder(TARGET_URL)
|
HttpEmitterConfig config = new HttpEmitterConfig.Builder(TARGET_URL)
|
||||||
.setFlushMillis(timeInMillis)
|
.setFlushMillis(timeInMillis)
|
||||||
|
.setFlushTimeout(TimeUnit.MILLISECONDS.convert(10, TimeUnit.SECONDS))
|
||||||
.setFlushCount(Integer.MAX_VALUE)
|
.setFlushCount(Integer.MAX_VALUE)
|
||||||
.build();
|
.build();
|
||||||
HttpPostEmitter emitter = new HttpPostEmitter(
|
HttpPostEmitter emitter = new HttpPostEmitter(
|
||||||
|
@ -132,6 +134,7 @@ public class EmitterTest
|
||||||
{
|
{
|
||||||
HttpEmitterConfig config = new HttpEmitterConfig.Builder(TARGET_URL)
|
HttpEmitterConfig config = new HttpEmitterConfig.Builder(TARGET_URL)
|
||||||
.setFlushMillis(Long.MAX_VALUE)
|
.setFlushMillis(Long.MAX_VALUE)
|
||||||
|
.setFlushTimeout(TimeUnit.MILLISECONDS.convert(10, TimeUnit.SECONDS))
|
||||||
.setFlushCount(size)
|
.setFlushCount(size)
|
||||||
.build();
|
.build();
|
||||||
HttpPostEmitter emitter = new HttpPostEmitter(
|
HttpPostEmitter emitter = new HttpPostEmitter(
|
||||||
|
|
Loading…
Reference in New Issue