Skip to content

Commit

Permalink
[mq] working branch - merge bf3f77e on top of main at edd7e6f
Browse files Browse the repository at this point in the history
{"baseBranch":"main","baseCommit":"edd7e6feb1b52e518f08c4b4e09766556d5b307b","createdAt":"2024-07-16T20:46:14.135427Z","headSha":"bf3f77ee93f067f301001e795fcb69d12e946ae7","id":"8e35e740-2015-4e22-994c-b6674aa394ad","priority":"200","pullRequestNumber":"27636","queuedAt":"2024-07-16T20:59:29.768814Z","status":"STATUS_QUEUED"}
  • Loading branch information
dd-mergequeue[bot] committed Jul 16, 2024
2 parents e192778 + bf3f77e commit cfc8766
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/trace/api/api_oom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func TestOOMKill(t *testing.T) {
conf.Endpoints[0].APIKey = "apikey_2"
conf.WatchdogInterval = time.Millisecond
conf.MaxMemory = 0.1 * 1000 * 1000 // 100KB
conf.ReceiverPort = 8327 // use non-default port to avoid conflict with running agent

r := newTestReceiverFromConfig(conf)
r.Start()
Expand All @@ -58,7 +59,7 @@ func TestOOMKill(t *testing.T) {
wg.Add(1)
go func() {
defer wg.Done()
resp, err := http.Post("http://localhost:8126/v0.4/traces", "application/msgpack", bytes.NewReader(data))
resp, err := http.Post("http://localhost:8327/v0.4/traces", "application/msgpack", bytes.NewReader(data))
if err != nil {
t.Log("Error posting payload", err)
return
Expand Down
5 changes: 4 additions & 1 deletion pkg/trace/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func newTestReceiverConfig() *config.AgentConfig {
conf := config.New()
conf.Endpoints[0].APIKey = "test"
conf.DecoderTimeout = 10000
conf.ReceiverPort = 8326 // use non-default port to avoid conflict with a running agent

return conf
}
Expand Down Expand Up @@ -166,6 +167,8 @@ func TestStateHeaders(t *testing.T) {
assert := assert.New(t)
cfg := newTestReceiverConfig()
cfg.AgentVersion = "testVersion"
url := fmt.Sprintf("http://%s:%d",
cfg.ReceiverHost, cfg.ReceiverPort)
r := newTestReceiverFromConfig(cfg)
r.Start()
defer r.Stop()
Expand All @@ -183,7 +186,7 @@ func TestStateHeaders(t *testing.T) {
"/v0.5/traces",
"/v0.7/traces",
} {
resp, err := http.Post("http://localhost:8126"+e, "application/msgpack", bytes.NewReader(data))
resp, err := http.Post(url+e, "application/msgpack", bytes.NewReader(data))
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit cfc8766

Please sign in to comment.