(p *testpb.Payload)
| 124 | } |
| 125 | |
| 126 | func payloadToID(p *testpb.Payload) int32 { |
| 127 | if p == nil || len(p.Body) != 4 { |
| 128 | panic("invalid payload") |
| 129 | } |
| 130 | return int32(p.Body[0]) + int32(p.Body[1])<<8 + int32(p.Body[2])<<16 + int32(p.Body[3])<<24 |
| 131 | } |
| 132 | |
| 133 | // test is an end-to-end test. It should be created with the newTest |
| 134 | // func, modified as needed, and then started with its startServer method. |