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

Side by Side Diff: appengine/cmd/dm/mutate/record_completion_test.go

Issue 1537883002: Initial distributor implementation (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: fix imports and make dummy.go a real file Created 4 years, 6 months 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 mutate 5 package mutate
6 6
7 import ( 7 import (
8 "testing" 8 "testing"
9 9
10 "github.com/luci/gae/impl/memory" 10 "github.com/luci/gae/impl/memory"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 Convey("BDG exists, with unfinished deps", func( ) { 57 Convey("BDG exists, with unfinished deps", func( ) {
58 bd := &model.BackDep{ 58 bd := &model.BackDep{
59 Depender: *dm.NewAttemptID( "from", 1), 59 Depender: *dm.NewAttemptID( "from", 1),
60 DependeeGroup: rc.Root(c), 60 DependeeGroup: rc.Root(c),
61 } 61 }
62 So(ds.Put(bdg, bd), ShouldBeNil) 62 So(ds.Put(bdg, bd), ShouldBeNil)
63 63
64 muts, err := rc.RollForward(c) 64 muts, err := rc.RollForward(c)
65 So(err, ShouldBeNil) 65 So(err, ShouldBeNil)
66 » » » » » So(muts, ShouldResemble, []tumble.Mutati on{ 66 » » » » » So(muts, ShouldResemble, []tumble.Mutati on{&AckFwdDep{bd.Edge()}})
67 » » » » » » &AckFwdDep{Dep: bd.Edge(), DepIs Finished: true},
68 » » » » » })
69 67
70 So(ds.Get(bdg, bd), ShouldBeNil) 68 So(ds.Get(bdg, bd), ShouldBeNil)
71 So(bdg.AttemptFinished, ShouldBeTrue) 69 So(bdg.AttemptFinished, ShouldBeTrue)
72 So(bd.Propagated, ShouldBeTrue) 70 So(bd.Propagated, ShouldBeTrue)
73 }) 71 })
74 72
75 Convey("BDG exists, with finished deps", func() { 73 Convey("BDG exists, with finished deps", func() {
76 bd := &model.BackDep{ 74 bd := &model.BackDep{
77 Depender: *dm.NewAttemptID( "from", 1), 75 Depender: *dm.NewAttemptID( "from", 1),
78 DependeeGroup: rc.Root(c), 76 DependeeGroup: rc.Root(c),
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 So(len(muts), ShouldEqual, amtWork-compl etionLimit) 112 So(len(muts), ShouldEqual, amtWork-compl etionLimit)
115 113
116 muts, err = rc.RollForward(c) 114 muts, err = rc.RollForward(c)
117 So(err, ShouldBeNil) 115 So(err, ShouldBeNil)
118 So(muts, ShouldBeEmpty) 116 So(muts, ShouldBeEmpty)
119 }) 117 })
120 }) 118 })
121 }) 119 })
122 }) 120 })
123 } 121 }
OLDNEW
« no previous file with comments | « appengine/cmd/dm/mutate/record_completion.go ('k') | appengine/cmd/dm/mutate/schedule_execution.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698