Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Side by Side Diff: logdog/appengine/coordinator/endpoints/services/terminateStream_test.go

Issue 2592753002: Create unbuffered Tumble entry point for LogDog. (Closed)
Patch Set: Add bench, update. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package services 5 package services
6 6
7 import ( 7 import (
8 "errors" 8 "errors"
9 "testing" 9 "testing"
10 "time" 10 "time"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 Convey(`A non-terminal registered stream, "testing/+/foo /bar"`, func() { 64 Convey(`A non-terminal registered stream, "testing/+/foo /bar"`, func() {
65 tls.WithProjectNamespace(c, func(c context.Conte xt) { 65 tls.WithProjectNamespace(c, func(c context.Conte xt) {
66 So(tls.Put(c), ShouldBeNil) 66 So(tls.Put(c), ShouldBeNil)
67 67
68 // Create an archival request for Tumble so we can ensure that it is 68 // Create an archival request for Tumble so we can ensure that it is
69 // replaced on termination. This is norm ally done by RegisterStream. 69 // replaced on termination. This is norm ally done by RegisterStream.
70 areq := mutations.CreateArchiveTask{ 70 areq := mutations.CreateArchiveTask{
71 ID: tls.Stream.ID, 71 ID: tls.Stream.ID,
72 Expiration: env.Clock.Now().Add( time.Hour), 72 Expiration: env.Clock.Now().Add( time.Hour),
73 } 73 }
74 » » » » » arParent, arName := areq.TaskName(c) 74 » » » » » arParent, arName := ds.KeyForObj(c, tls. Stream), areq.TaskName(c)
75 err := tumble.PutNamedMutations(c, arPar ent, map[string]tumble.Mutation{ 75 err := tumble.PutNamedMutations(c, arPar ent, map[string]tumble.Mutation{
76 arName: &areq, 76 arName: &areq,
77 }) 77 })
78 if err != nil { 78 if err != nil {
79 panic(err) 79 panic(err)
80 } 80 }
81 }) 81 })
82 ds.GetTestable(c).CatchupIndexes() 82 ds.GetTestable(c).CatchupIndexes()
83 83
84 Convey(`Can be marked terminal and schedules an archival mutation.`, func() { 84 Convey(`Can be marked terminal and schedules an archival mutation.`, func() {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 }) 223 })
224 224
225 So(getParams(), ShouldResemble, &coordinator.Arc hivalParams{ 225 So(getParams(), ShouldResemble, &coordinator.Arc hivalParams{
226 SettleDelay: 10 * time.Second, 226 SettleDelay: 10 * time.Second,
227 CompletePeriod: 0, 227 CompletePeriod: 0,
228 }) 228 })
229 }) 229 })
230 }) 230 })
231 }) 231 })
232 } 232 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698