Atlas › Test

nil_message

Exact test identity: go.temporal.io/server/common/protocol/TestNilSafety/nil_message

Package
go.temporal.io/server/common/protocol
Suite / test hierarchy
TestNilSafety/nil_message
Test
nil_message
Introduced at
naming.go ×1 Frontier kind: Joint frontier
Covered ranges
4
Covered lines
8
Covered files
1

Covered source

Expand a file to inspect source; the > gutter marks covered lines.

go.temporal.io/server/common/protocol/naming.go 8 covered LOC · 4 ranges

Open complete file

42 // message type of the body and the type of the protocol to which this message
43 // belongs.
44 > func Identify(msg *protocolpb.Message) (Type, MessageType, error) { naming.go
45 > if msg == nil {
46 > return TypeUnknown, MessageTypeUnknown, errNilMsg naming.go
47 > } else if msg.Body == nil { naming.go
48 return TypeUnknown, MessageTypeUnknown, errNilBody
49 }
66 // MessageTypeUnknown in the case where either one cannot be determined due to
67 // an error.
68 > func IdentifyOrUnknown(msg *protocolpb.Message) (Type, MessageType) { naming.go
69 > pt, mt, _ := Identify(msg)
70 > return pt, mt
71 > }
72
73 func (cerr constErr) Error() string {