File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
dd-java-agent/agent-debugger/src/test/java/com/datadog/debugger/uploader
internal-api/src/test/groovy/datadog/trace/api Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,15 @@ public void tearDown() throws IOException {
7171 }
7272 }
7373
74+ @ Test
75+ void testUnixDomainSocket () {
76+ when (config .getAgentUnixDomainSocket ()).thenReturn ("/tmp/ddagent/agent.sock" );
77+ uploader = new BatchUploader (config , "http://localhost:8126" );
78+ assertEquals (
79+ "datadog.common.socket.UnixDomainSocketFactory" ,
80+ uploader .getClient ().socketFactory ().getClass ().getTypeName ());
81+ }
82+
7483 @ Test
7584 void testOkHttpClientForcesCleartextConnspecWhenNotUsingTLS () {
7685 uploader = new BatchUploader (config , "http://example.com" );
Original file line number Diff line number Diff line change @@ -2465,4 +2465,18 @@ class ConfigTest extends DDSpecification {
24652465 " auto" | true | PROFILING_START_DELAY_DEFAULT | PROFILING_START_FORCE_FIRST_DEFAULT
24662466 // spotless:on
24672467 }
2468+
2469+ def " url for debugger with unix domain socket" () {
2470+ when :
2471+ def prop = new Properties ()
2472+ prop. setProperty(AGENT_HOST , " myhost" )
2473+ prop. setProperty(TRACE_AGENT_PORT , " 1234" )
2474+ prop. setProperty(TRACE_AGENT_URL , " unix:///path/to/socket" )
2475+
2476+ Config config = Config . get(prop)
2477+
2478+ then :
2479+ config. finalDebuggerSnapshotUrl == " http://localhost:8126/debugger/v1/input"
2480+ config. finalDebuggerSymDBUrl == " http://localhost:8126/symdb/v1/input"
2481+ }
24682482}
You can’t perform that action at this time.
0 commit comments