| OLD | NEW |
| 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 Loading... |
| 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.PutMulti([]interface{}{bdg, bd}),
ShouldBeNil) | 62 So(ds.PutMulti([]interface{}{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.GetMulti([]interface{}{bdg, bd}),
ShouldBeNil) | 68 So(ds.GetMulti([]interface{}{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 Loading... |
| 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 } |
| OLD | NEW |