@@ -16,8 +16,8 @@ type CompareAndSwapCommand struct {
Key string `json:"key"`
Value string `json:"value"`
ExpireTime time.Time `json:"expireTime"`
- PrevValue string `json: prevValue`
- PrevIndex uint64 `json: prevIndex`
+ PrevValue string `json:"prevValue"`
+ PrevIndex uint64 `json:"prevIndex"`
}
// The name of the testAndSet command in the log
@@ -41,7 +41,7 @@ type Stats struct {
// Number of create requests
CreateSuccess uint64 `json:"createSuccess"`
- CreateFail uint64 `json:createFail`
+ CreateFail uint64 `json:"createFail"`
// Number of testAndSet requests
CompareAndSwapSuccess uint64 `json:"compareAndSwapSuccess"`
@@ -9,7 +9,7 @@ func TestWatcher(t *testing.T) {
wh := s.WatcherHub
c, err := wh.watch("/foo", true, 1)
if err != nil {
- t.Fatal("%v", err)
+ t.Fatalf("%v", err)
select {