MCPcopy Index your code
hub / github.com/aws/aws-lambda-go / TestXRayCausePlumbing

Function TestXRayCausePlumbing

lambda/invoke_loop_test.go:94–196  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

92}
93
94func TestXRayCausePlumbing(t *testing.T) {
95 errors := []error{
96 errors.New("barf"),
97 messages.InvokeResponse_Error{
98 Type: "yoloError",
99 Message: "hello yolo",
100 StackTrace: []*messages.InvokeResponse_Error_StackFrame{
101 {Label: "yolo", Path: "yolo", Line: 2},
102 {Label: "hi", Path: "hello/hello", Line: 12},
103 },
104 },
105 messages.InvokeResponse_Error{
106 Type: "yoloError",
107 Message: "hello yolo",
108 StackTrace: []*messages.InvokeResponse_Error_StackFrame{
109 {Label: "hi", Path: "hello/hello", Line: 12},
110 {Label: "hihi", Path: "hello/hello", Line: 13},
111 {Label: "yolo", Path: "yolo", Line: 2},
112 {Label: "hi", Path: "hello/hello", Line: 14},
113 },
114 },
115 messages.InvokeResponse_Error{
116 Type: "yoloError",
117 Message: "hello yolo",
118 StackTrace: []*messages.InvokeResponse_Error_StackFrame{},
119 },
120 messages.InvokeResponse_Error{
121 Type: "yoloError",
122 Message: "hello yolo",
123 },
124 }
125 wd, _ := os.Getwd()
126 expected := []string{
127 `{
128 "working_directory":"` + wd + `",
129 "paths": [],
130 "exceptions": [{
131 "type": "errorString",
132 "message": "barf",
133 "stack": []
134 }]
135 }`,
136 `{
137 "working_directory":"` + wd + `",
138 "paths": ["yolo", "hello/hello"],
139 "exceptions": [{
140 "type": "yoloError",
141 "message": "hello yolo",
142 "stack": [
143 {"label": "yolo", "path": "yolo", "line": 2},
144 {"label": "hi", "path": "hello/hello", "line": 12}
145 ]
146 }]
147 }`,
148 `{
149 "working_directory":"` + wd + `",
150 "paths": ["hello/hello", "yolo"],
151 "exceptions": [{

Callers

nothing calls this directly

Calls 4

runtimeAPIServerFunction · 0.85
NewHandlerFunction · 0.85
startRuntimeAPILoopFunction · 0.70
CloseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…