dsmiley commented on code in PR #1168:
URL: https://github.com/apache/solr/pull/1168#discussion_r1060202102


##########
solr/modules/opentelemetry/src/test/org/apache/solr/opentelemetry/OtelTracerConfiguratorTest.java:
##########
@@ -73,4 +86,24 @@ public void testSetDefaultIfNotConfigured() {
     assertEquals("default", instance.getCurrentOtelConfig().get("OTEL_YEY"));
     assertEquals("prop-k1", instance.getCurrentOtelConfig().get("OTEL_K1"));
   }
+
+  @Test
+  public void testInjected() throws Exception {
+    // Make sure the batch exporter times out before our thread lingering time 
of 10s
+    instance.setDefaultIfNotConfigured("OTEL_BSP_SCHEDULE_DELAY", "1000");
+    instance.setDefaultIfNotConfigured("OTEL_BSP_EXPORT_TIMEOUT", "2000");
+    MiniSolrCloudCluster cluster =
+        new MiniSolrCloudCluster.Builder(2, createTempDir())
+            .addConfig("config", 
TEST_PATH().resolve("collection1").resolve("conf"))
+            .withSolrXml(getFile("solr/solr.xml").toPath())
+            .build();
+    try {
+      TimeOut timeOut = new TimeOut(2, TimeUnit.MINUTES, TimeSource.NANO_TIME);
+      timeOut.waitFor(
+          "Waiting for GlobalTracer is registered",
+          () -> GlobalTracer.get().toString().contains("TracerShim"));

Review Comment:
   Yeah.  MiniSolrCloudCluster is certainly finished when build is returned.  
Look at the end of MSCC's constructor -- it waits for all servers to be 
available.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to