[ARVADOS] updated: 1.3.0-2846-g98b67ab50
Git user
git at public.arvados.org
Mon Aug 17 14:54:00 UTC 2020
Summary of changes:
lib/dispatchcloud/worker/pool_test.go | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
via 98b67ab5086ddd3c66d28548fa3b486b2d08e572 (commit)
from e1ed6272d0e8ecf96aeb6905328498d023d34e0e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 98b67ab5086ddd3c66d28548fa3b486b2d08e572
Author: Tom Clegg <tom at tomclegg.ca>
Date: Mon Aug 17 10:53:16 2020 -0400
16631: Remove some unneeded code.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>
diff --git a/lib/dispatchcloud/worker/pool_test.go b/lib/dispatchcloud/worker/pool_test.go
index d437668aa..0c173c107 100644
--- a/lib/dispatchcloud/worker/pool_test.go
+++ b/lib/dispatchcloud/worker/pool_test.go
@@ -148,13 +148,13 @@ func (suite *PoolSuite) TestResumeAfterRestart(c *check.C) {
func (suite *PoolSuite) TestDrain(c *check.C) {
logger := ctxlog.TestLogger(c)
- driver := test.StubDriver{HoldCloudOps: true}
+ driver := test.StubDriver{}
instanceSet, err := driver.InstanceSet(nil, "test-instance-set-id", nil, logger)
c.Assert(err, check.IsNil)
ac := arvados.NewClientFromEnv()
- type1 := arvados.InstanceType{Name: "a1s", ProviderType: "a1.small", VCPUs: 1, RAM: 1 * GiB, Price: .01}
+ type1 := test.InstanceType(1)
pool := &Pool{
arvClient: ac,
logger: logger,
@@ -167,12 +167,7 @@ func (suite *PoolSuite) TestDrain(c *check.C) {
notify := pool.Subscribe()
defer pool.Unsubscribe(notify)
- c.Check(pool.Unallocated()[type1], check.Equals, 0)
pool.Create(type1)
- c.Check(pool.Unallocated()[type1], check.Equals, 1)
-
- // Unblock the pending Create call.
- go driver.ReleaseCloudOps(1)
// Wait for the instance to either return from its Create
// call, or show up in a poll.
@@ -194,13 +189,11 @@ func (suite *PoolSuite) TestDrain(c *check.C) {
for _, test := range tests {
for _, wkr := range pool.workers {
- if wkr.instType == type1 {
- wkr.state = test.state
- wkr.idleBehavior = test.idleBehavior
- }
+ wkr.state = test.state
+ wkr.idleBehavior = test.idleBehavior
}
- // Try to start another container
+ // Try to start a container
started := pool.StartContainer(type1, arvados.Container{UUID: "testcontainer"})
c.Check(started, check.Equals, test.result)
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list