加特林:执行者在轮询时不接受任务
Gatling: Executor not accepting task when polling
我有一个加特林场景,我需要在测试期间轮询特定端点。但是,当轮询请求时,它会导致非法状态异常,轮询时出现错误 executor not accepting task
。
我已经查看了文档 here,但我不确定哪里出错了。
代码段如下所示:
.exec(
poll()
.every(5)
.exec(http("getWingboard")
.get(WingboardEnpoints.Wingboard)
.headers(Config.header)
.check(status().`is`(200))
))
错误如下所示:
[gatling-1-2] DEBUG i.g.h.client.impl.DefaultHttpClient - Failed to connect to remoteAddress=xxxx/108.156.28.72:443 from localAddress=null
java.lang.IllegalStateException: executor not accepting a task
at io.netty.resolver.AddressResolverGroup.getResolver(AddressResolverGroup.java:61)
at io.netty.bootstrap.Bootstrap.doResolveAndConnect0(Bootstrap.java:194)
at io.netty.bootstrap.Bootstrap.doResolveAndConnect(Bootstrap.java:162)
at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:148)
at io.gatling.http.client.impl.DefaultHttpClient.openNewChannelRec(DefaultHttpClient.java:809)
at io.gatling.http.client.impl.DefaultHttpClient.lambda$openNewChannelRec(DefaultHttpClient.java:843)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:571)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:550)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491)
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616)
at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:609)
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117)
at io.netty.channel.nio.AbstractNioChannel.doClose(AbstractNioChannel.java:502)
at io.netty.channel.socket.nio.NioSocketChannel.doClose(NioSocketChannel.java:342)
at io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:754)
at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:731)
at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:620)
at io.netty.channel.nio.NioEventLoop.closeAll(NioEventLoop.java:772)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:529)
at io.netty.util.concurrent.SingleThreadEventExecutor.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)
我在 Kotlin 中使用 Gatling gradle 插件 v3.7.4。
轮询是一项后台任务,仅在虚拟用户执行其主要场景时才会持续。我怀疑您的用户除了轮询之外没有执行任何其他操作。
否则,请提供完整的复制器。
我有一个加特林场景,我需要在测试期间轮询特定端点。但是,当轮询请求时,它会导致非法状态异常,轮询时出现错误 executor not accepting task
。
我已经查看了文档 here,但我不确定哪里出错了。
代码段如下所示:
.exec(
poll()
.every(5)
.exec(http("getWingboard")
.get(WingboardEnpoints.Wingboard)
.headers(Config.header)
.check(status().`is`(200))
))
错误如下所示:
[gatling-1-2] DEBUG i.g.h.client.impl.DefaultHttpClient - Failed to connect to remoteAddress=xxxx/108.156.28.72:443 from localAddress=null
java.lang.IllegalStateException: executor not accepting a task
at io.netty.resolver.AddressResolverGroup.getResolver(AddressResolverGroup.java:61)
at io.netty.bootstrap.Bootstrap.doResolveAndConnect0(Bootstrap.java:194)
at io.netty.bootstrap.Bootstrap.doResolveAndConnect(Bootstrap.java:162)
at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:148)
at io.gatling.http.client.impl.DefaultHttpClient.openNewChannelRec(DefaultHttpClient.java:809)
at io.gatling.http.client.impl.DefaultHttpClient.lambda$openNewChannelRec(DefaultHttpClient.java:843)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:571)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:550)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491)
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616)
at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:609)
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117)
at io.netty.channel.nio.AbstractNioChannel.doClose(AbstractNioChannel.java:502)
at io.netty.channel.socket.nio.NioSocketChannel.doClose(NioSocketChannel.java:342)
at io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:754)
at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:731)
at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:620)
at io.netty.channel.nio.NioEventLoop.closeAll(NioEventLoop.java:772)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:529)
at io.netty.util.concurrent.SingleThreadEventExecutor.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)
我在 Kotlin 中使用 Gatling gradle 插件 v3.7.4。
轮询是一项后台任务,仅在虚拟用户执行其主要场景时才会持续。我怀疑您的用户除了轮询之外没有执行任何其他操作。
否则,请提供完整的复制器。