我最近升级了HttpExecutor到v2版本。现在开始在运行测试用例时面临重复指标的问题。
Caused by: java.lang.IllegalArgumentException: A metric named okhttp3.OkHttpClient.connection-pool-total-count already exists
[ERROR] com.main.testSuccessMetadataStore Time elapsed: 0.088 s <<< ERROR!
com.google.inject.ProvisionException:
Unable to provision, see the following errors:
1) [Guice/ErrorInjectingConstructor]: IllegalArgumentException: A metric named okhttp3.OkHttpClient.connection-pool-total-count already exists
1条答案
按热度按时间thtygnil1#
通过向httpconfiguration的yml添加额外的配置解决了这个问题。问题是我没有为HttpConfiguration传递配置clientId,因此,对于每个测试用例执行,都会为http客户端创建一个新的指标。