-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23712 from sophokles73/fix_setting_of_sampler_man…
…ager_host_property Fix setting of JAEGER_SAMPLER_MANAGER_HOST_PORT system property
- Loading branch information
Showing
2 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
...eger/deployment/src/test/java/io/quarkus/jaeger/test/SamplerManagerConfigurationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package io.quarkus.jaeger.test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.jaegertracing.Configuration.SamplerConfiguration; | ||
import io.quarkus.test.QuarkusUnitTest; | ||
|
||
/** | ||
* Tests verifying configuration of a remote sampler manager. | ||
* | ||
*/ | ||
public class SamplerManagerConfigurationTest { | ||
|
||
@RegisterExtension | ||
static final QuarkusUnitTest TEST = new QuarkusUnitTest().withEmptyApplication() | ||
.overrideConfigKey("quarkus.jaeger.service-name", "my-service") | ||
.overrideConfigKey("quarkus.jaeger.sampler-manager-host-port", "my-jaeger-host:5778"); | ||
|
||
/** | ||
* Verifies that the {@code JAEGER_SAMPLER_MANAGER_HOST_PORT} system property is set to the | ||
* host name and port specified in the {@code quarkus.jaeger.sampler-manager-host-port} property. | ||
*/ | ||
@Test | ||
void testSamplerManagerHostIsSetCorrectly() { | ||
SamplerConfiguration config = SamplerConfiguration.fromEnv(); | ||
assertEquals("my-jaeger-host:5778", config.getManagerHostPort()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters