From ff838700d0f38d54b61bad2a848b83d92787b2dd Mon Sep 17 00:00:00 2001 From: James Shubin Date: Tue, 2 Feb 2016 04:36:12 -0500 Subject: [PATCH] Add a fan in example and test --- examples/graph9.yaml | 77 ++++++++++++++++++++++++++++++++++++++++++++ test/shell/t4.sh | 10 ++++++ test/shell/t4.yaml | 77 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 examples/graph9.yaml create mode 100755 test/shell/t4.sh create mode 100644 test/shell/t4.yaml diff --git a/examples/graph9.yaml b/examples/graph9.yaml new file mode 100644 index 00000000..5846360a --- /dev/null +++ b/examples/graph9.yaml @@ -0,0 +1,77 @@ +--- +graph: mygraph +comment: simple exec fan in example to demonstrate optimization) +types: + exec: + - name: exec1 + cmd: sleep 10s + shell: '' + timeout: 0 + watchcmd: '' + watchshell: '' + ifcmd: '' + ifshell: '' + pollint: 0 + state: present + - name: exec2 + cmd: sleep 10s + shell: '' + timeout: 0 + watchcmd: '' + watchshell: '' + ifcmd: '' + ifshell: '' + pollint: 0 + state: present + - name: exec3 + cmd: sleep 10s + shell: '' + timeout: 0 + watchcmd: '' + watchshell: '' + ifcmd: '' + ifshell: '' + pollint: 0 + state: present + - name: exec4 + cmd: sleep 10s + shell: '' + timeout: 0 + watchcmd: '' + watchshell: '' + ifcmd: '' + ifshell: '' + pollint: 0 + state: present + - name: exec5 + cmd: sleep 10s + shell: '' + timeout: 0 + watchcmd: '' + watchshell: '' + ifcmd: '' + ifshell: '' + pollint: 0 + state: present +edges: +- name: e1 + from: + type: exec + name: exec1 + to: + type: exec + name: exec5 +- name: e2 + from: + type: exec + name: exec2 + to: + type: exec + name: exec5 +- name: e3 + from: + type: exec + name: exec3 + to: + type: exec + name: exec5 diff --git a/test/shell/t4.sh b/test/shell/t4.sh new file mode 100755 index 00000000..6118f9c0 --- /dev/null +++ b/test/shell/t4.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +. etcd.sh # start etcd as job # 1 + +# should take slightly more than 25s, but fail if we take 35s) +timeout --kill-after=35s 30s ./mgmt run --file t4.yaml --converged-timeout=5 --no-watch & + +#jobs # etcd is 1 +#wait -n 2 # wait for mgmt to exit +. wait.sh # wait for everything except etcd diff --git a/test/shell/t4.yaml b/test/shell/t4.yaml new file mode 100644 index 00000000..5846360a --- /dev/null +++ b/test/shell/t4.yaml @@ -0,0 +1,77 @@ +--- +graph: mygraph +comment: simple exec fan in example to demonstrate optimization) +types: + exec: + - name: exec1 + cmd: sleep 10s + shell: '' + timeout: 0 + watchcmd: '' + watchshell: '' + ifcmd: '' + ifshell: '' + pollint: 0 + state: present + - name: exec2 + cmd: sleep 10s + shell: '' + timeout: 0 + watchcmd: '' + watchshell: '' + ifcmd: '' + ifshell: '' + pollint: 0 + state: present + - name: exec3 + cmd: sleep 10s + shell: '' + timeout: 0 + watchcmd: '' + watchshell: '' + ifcmd: '' + ifshell: '' + pollint: 0 + state: present + - name: exec4 + cmd: sleep 10s + shell: '' + timeout: 0 + watchcmd: '' + watchshell: '' + ifcmd: '' + ifshell: '' + pollint: 0 + state: present + - name: exec5 + cmd: sleep 10s + shell: '' + timeout: 0 + watchcmd: '' + watchshell: '' + ifcmd: '' + ifshell: '' + pollint: 0 + state: present +edges: +- name: e1 + from: + type: exec + name: exec1 + to: + type: exec + name: exec5 +- name: e2 + from: + type: exec + name: exec2 + to: + type: exec + name: exec5 +- name: e3 + from: + type: exec + name: exec3 + to: + type: exec + name: exec5