Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions lambda/invoke_loop_gte_go122_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,20 @@ func TestRuntimeAPILoopWithConcurrencyPanic(t *testing.T) {
assert.Equal(t, concurrency, record.nGets)
assert.Equal(t, concurrency, record.nPosts)
assert.Equal(t, int32(concurrency), counter.Load())
assert.Contains(t, string(record.responses[0]), "panic 1")

// Verify all three panics are in the responses (order may vary due to concurrency)
allResponses := ""
for _, resp := range record.responses {
allResponses += string(resp)
}
assert.Contains(t, allResponses, "panic 1")
assert.Contains(t, allResponses, "panic 2")
assert.Contains(t, allResponses, "panic 3")

logs := logBuf.String()
idx1 := strings.Index(logs, "panic 1")
idx2 := strings.Index(logs, "panic 2")
idx3 := strings.Index(logs, "panic 3")
assert.Greater(t, idx1, -1)
assert.Greater(t, idx2, idx1)
assert.Greater(t, idx3, idx2)
assert.Contains(t, logs, "panic 1")
assert.Contains(t, logs, "panic 2")
assert.Contains(t, logs, "panic 3")
}

func TestConcurrencyWithRIE(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion lambda/sigterm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TestEnableSigterm(t *testing.T) {

time.Sleep(5 * time.Second) // Wait for container to start

client := &http.Client{Timeout: 5 * time.Second}
client := &http.Client{Timeout: 10 * time.Second}
invokeURL := fmt.Sprintf("http://127.0.0.1:%d/2015-03-31/functions/function/invocations", port)
resp, err := client.Post(invokeURL, "application/json", strings.NewReader("{}"))
require.NoError(t, err)
Expand Down
Loading