Atlas › Test

TestWithInvalidBody

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

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

Covered source

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

go.temporal.io/server/common/protocol/naming.go 7 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
47 > } else if msg.Body == nil { naming.go
48 return TypeUnknown, MessageTypeUnknown, errNilBody
49 }
50
51 > bodyTypeName := string(msg.Body.MessageName()) naming.go
52 > if bodyTypeName == "" {
53 > return TypeUnknown, MessageTypeUnknown, errNoName naming.go
54 > }
55
56 msgType := MessageType(bodyTypeName)