Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 1 | <!-- |
Brian O'Connor | ce2a03d | 2017-08-03 19:21:03 -0700 | [diff] [blame] | 2 | ~ Copyright 2016-present Open Networking Foundation |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 3 | ~ |
| 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | ~ you may not use this file except in compliance with the License. |
| 6 | ~ You may obtain a copy of the License at |
| 7 | ~ |
| 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | ~ |
| 10 | ~ Unless required by applicable law or agreed to in writing, software |
| 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | ~ See the License for the specific language governing permissions and |
| 14 | ~ limitations under the License. |
| 15 | --> |
| 16 | |
Ray Milkey | 685e34d | 2016-09-01 12:01:09 -0700 | [diff] [blame] | 17 | <scenario name="distributed-value-test" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 18 | description="ONOS AtomicValue distributed primitive Test"> |
| 19 | <group name="Distributed-Primitive-Value"> |
| 20 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 21 | <step name="Distributed-Primitive-Value.Test-Value-Initial-Value" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 22 | exec="onos-cluster-execute-expect value-test test-value get --expect null"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 23 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 24 | <step name="Distributed-Primitive-Value.Test-Value-Set" |
| 25 | requires="Distributed-Primitive-Value.Test-Value-Initial-Value" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 26 | exec="onos ${OCI} value-test test-value set v0"/> |
| 27 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 28 | <step name="Distributed-Primitive-Value.Test-Value-Get" |
| 29 | requires="Distributed-Primitive-Value.Test-Value-Set" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 30 | exec="onos-cluster-execute-expect value-test test-value get --expect v0"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 31 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 32 | <step name="Distributed-Primitive-Value.Test-Value-CompareAndSet-False" |
| 33 | requires="Distributed-Primitive-Value.Test-Value-Get" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 34 | exec="onos-execute-expect ${OCI} value-test test-value compareAndSet v1 v2 --expect false"/> |
| 35 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 36 | <step name="Distributed-Primitive-Value.Test-Value-Not-Updated-After-CAS" |
| 37 | requires="Distributed-Primitive-Value.Test-Value-CompareAndSet-False" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 38 | exec="onos-cluster-execute-expect value-test test-value get --expect v0"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 39 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 40 | <step name="Distributed-Primitive-Value.Test-Value-CompareAndSet-True" |
| 41 | requires="Distributed-Primitive-Value.Test-Value-Not-Updated-After-CAS" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 42 | exec="onos-execute-expect ${OCI} value-test test-value compareAndSet v0 v1 --expect true"/> |
| 43 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 44 | <step name="Distributed-Primitive-Value.Test-Value-Updated-After-CAS" |
| 45 | requires="Distributed-Primitive-Value.Test-Value-CompareAndSet-True" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 46 | exec="onos-cluster-execute-expect value-test test-value get --expect v1"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 47 | |
Jon Hall | 3988a56 | 2017-03-16 14:21:14 -0700 | [diff] [blame] | 48 | <step name="Distributed-Primitive-Value.Test-Value-GetAndSet" |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 49 | requires="Distributed-Primitive-Value.Test-Value-Updated-After-CAS" |
Jon Hall | 3988a56 | 2017-03-16 14:21:14 -0700 | [diff] [blame] | 50 | exec="onos-execute-expect ${OCI} value-test test-value getAndSet v2 --expect v1"/> |
| 51 | |
| 52 | <step name="Distributed-Primitive-Value.Test-Value-Updated-After-GetAndSet" |
| 53 | requires="Distributed-Primitive-Value.Test-Value-GetAndSet" |
| 54 | exec="onos-cluster-execute-expect value-test test-value get --expect v2"/> |
| 55 | |
| 56 | <step name="Distributed-Primitive-Value.Destroy-Value" |
| 57 | requires="Distributed-Primitive-Value.Test-Value-Updated-After-GetAndSet" |
Ray Milkey | 685e34d | 2016-09-01 12:01:09 -0700 | [diff] [blame] | 58 | exec="onos ${OCI} value-test test-value set null"/> |
| 59 | |
Jon Hall | e4a6100 | 2017-02-16 18:37:02 -0800 | [diff] [blame] | 60 | <group name="Distributed-Primitive-Value.Check-Log-Exceptions" |
| 61 | requires="Distributed-Primitive-Value.Destroy-Value"> |
| 62 | <parallel var="${OC#}"> |
| 63 | <step name="Distributed-Primitive-Value.Check-Log-Exceptions-${#}" |
| 64 | exec="onos-check-logs ${OC#}"/> |
| 65 | </parallel> |
| 66 | </group> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 67 | |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 68 | </group> |
| 69 | </scenario> |
| 70 | |