Merge "Fix race in test_hold_expiration_no_default"
This commit is contained in:
commit
e9b82226a5
48
nodepool/tests/fixtures/node_max_hold_age_no_default.yaml
vendored
Normal file
48
nodepool/tests/fixtures/node_max_hold_age_no_default.yaml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
elements-dir: .
|
||||
images-dir: '{images_dir}'
|
||||
build-log-dir: '{build_log_dir}'
|
||||
|
||||
zookeeper-servers:
|
||||
- host: {zookeeper_host}
|
||||
port: {zookeeper_port}
|
||||
chroot: {zookeeper_chroot}
|
||||
|
||||
labels:
|
||||
- name: fake-label
|
||||
min-ready: 1
|
||||
|
||||
providers:
|
||||
- name: fake-provider
|
||||
cloud: fake
|
||||
driver: fake
|
||||
region-name: fake-region
|
||||
rate: 0.0001
|
||||
diskimages:
|
||||
- name: fake-image
|
||||
meta:
|
||||
key: value
|
||||
key2: value
|
||||
pools:
|
||||
- name: main
|
||||
max-servers: 96
|
||||
availability-zones:
|
||||
- az1
|
||||
networks:
|
||||
- net-name
|
||||
labels:
|
||||
- name: fake-label
|
||||
diskimage: fake-image
|
||||
min-ram: 8192
|
||||
flavor-name: 'Fake'
|
||||
|
||||
diskimages:
|
||||
- name: fake-image
|
||||
elements:
|
||||
- fedora
|
||||
- vm
|
||||
release: 21
|
||||
env-vars:
|
||||
TMPDIR: /opt/dib_tmp
|
||||
DIB_IMAGE_CACHE: /opt/dib_cache
|
||||
DIB_CLOUD_IMAGES: http://download.fedoraproject.org/pub/fedora/linux/releases/test/21-Beta/Cloud/Images/x86_64/
|
||||
BASE_IMAGE_FILE: Fedora-Cloud-Base-20141029-21_Beta.x86_64.qcow2
|
@ -735,7 +735,7 @@ class TestLauncher(tests.DBTestCase):
|
||||
def test_hold_expiration_no_default(self):
|
||||
"""Test a held node is deleted when past its operator-specified TTL,
|
||||
no max-hold-age set"""
|
||||
configfile = self.setup_config('node_max_ready_age.yaml')
|
||||
configfile = self.setup_config('node_max_hold_age_no_default.yaml')
|
||||
pool = self.useNodepool(configfile, watermark_sleep=1)
|
||||
self.useBuilder(configfile)
|
||||
pool.start()
|
||||
@ -748,7 +748,7 @@ class TestLauncher(tests.DBTestCase):
|
||||
# hold the node
|
||||
node.state = zk.HOLD
|
||||
node.comment = 'testing'
|
||||
node.hold_expiration = 5
|
||||
node.hold_expiration = 1
|
||||
self.zk.lockNode(node, blocking=False)
|
||||
self.zk.storeNode(node)
|
||||
self.zk.unlockNode(node)
|
||||
|
Loading…
x
Reference in New Issue
Block a user