OLD | NEW |
1 package traceservice | 1 package traceservice |
2 | 2 |
3 import ( | 3 import ( |
4 "encoding/binary" | 4 "encoding/binary" |
5 "fmt" | 5 "fmt" |
6 "math" | 6 "math" |
7 "os" | 7 "os" |
8 "testing" | 8 "testing" |
9 "time" | 9 "time" |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 "config": "gpu", | 101 "config": "gpu", |
102 "platform": "win8", | 102 "platform": "win8", |
103 "type": "skp", | 103 "type": "skp", |
104 }, | 104 }, |
105 }, | 105 }, |
106 }, | 106 }, |
107 } | 107 } |
108 | 108 |
109 ctx := context.Background() | 109 ctx := context.Background() |
110 | 110 |
| 111 // First confirm that Ping() works. |
| 112 _, err = ts.Ping(ctx, &Empty{}) |
| 113 assert.Nil(t, err) |
| 114 |
111 // Confirm that these traceids don't have Params stored in the db yet. | 115 // Confirm that these traceids don't have Params stored in the db yet. |
112 missingRequest := &MissingParamsRequest{ | 116 missingRequest := &MissingParamsRequest{ |
113 Traceids: []string{"key:8888:android", "key:gpu:win8"}, | 117 Traceids: []string{"key:8888:android", "key:gpu:win8"}, |
114 } | 118 } |
115 missingResp, err := ts.MissingParams(ctx, missingRequest) | 119 missingResp, err := ts.MissingParams(ctx, missingRequest) |
116 assert.NoError(t, err) | 120 assert.NoError(t, err) |
117 assert.Equal(t, missingResp.Traceids, missingRequest.Traceids) | 121 assert.Equal(t, missingResp.Traceids, missingRequest.Traceids) |
118 | 122 |
119 // Now add the Params for them. | 123 // Now add the Params for them. |
120 _, err = ts.AddParams(ctx, params) | 124 _, err = ts.AddParams(ctx, params) |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 229 |
226 b := c.ToBytes() | 230 b := c.ToBytes() |
227 | 231 |
228 // Test inputs that should fail. | 232 // Test inputs that should fail. |
229 _, err = newCommitInfo(b[1:]) | 233 _, err = newCommitInfo(b[1:]) |
230 assert.Error(t, err) | 234 assert.Error(t, err) |
231 | 235 |
232 _, err = newCommitInfo(b[:len(b)-1]) | 236 _, err = newCommitInfo(b[:len(b)-1]) |
233 assert.Error(t, err) | 237 assert.Error(t, err) |
234 } | 238 } |
OLD | NEW |