From 35baa6262009bd5419840fcad1915f8d6ff66a5e Mon Sep 17 00:00:00 2001 From: patsonluk Date: Thu, 10 Oct 2024 09:41:45 -0700 Subject: [PATCH] Tweak unit test case testConcurrentCallers --- .../org/apache/solr/servlet/PrometheusMetricsServletTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/servlet/PrometheusMetricsServletTest.java b/solr/core/src/test/org/apache/solr/servlet/PrometheusMetricsServletTest.java index b9cdaf2fd3c..1809ec49708 100644 --- a/solr/core/src/test/org/apache/solr/servlet/PrometheusMetricsServletTest.java +++ b/solr/core/src/test/org/apache/solr/servlet/PrometheusMetricsServletTest.java @@ -567,12 +567,12 @@ public void testConcurrentCallers() throws Exception { "# TYPE sub_shard_requests_get counter\n" + "sub_shard_requests_get 1\n"; - final int THREAD_COUNT = 10; + final int THREAD_COUNT = 100; ExecutorService executorService = ExecutorUtil.newMDCAwareFixedThreadPool( THREAD_COUNT, new SolrNamedThreadFactory("test-concurrent-metric-callers")); List> futures = new ArrayList<>(); - for (int i = 0 ; i < 10; i ++) { + for (int i = 0 ; i < THREAD_COUNT; i ++) { futures.add(executorService.submit(() -> { PrometheusMetricsServlet.ResultContext resultContext = new PrometheusMetricsServlet.ResultContext(new ArrayList<>()); assertMetricsApiCaller(