Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 1 | <!-- |
| 2 | ~ Copyright 2016-present Open Networking Laboratory |
| 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" |
| 22 | requires="Distributed-Primitives-Setup" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 23 | exec="onos-cluster-execute-expect value-test test-value get --expect null"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 24 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 25 | <step name="Distributed-Primitive-Value.Test-Value-Set" |
| 26 | requires="Distributed-Primitive-Value.Test-Value-Initial-Value" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 27 | exec="onos ${OCI} value-test test-value set v0"/> |
| 28 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 29 | <step name="Distributed-Primitive-Value.Test-Value-Get" |
| 30 | requires="Distributed-Primitive-Value.Test-Value-Set" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 31 | exec="onos-cluster-execute-expect value-test test-value get --expect v0"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 32 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 33 | <step name="Distributed-Primitive-Value.Test-Value-CompareAndSet-False" |
| 34 | requires="Distributed-Primitive-Value.Test-Value-Get" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 35 | exec="onos-execute-expect ${OCI} value-test test-value compareAndSet v1 v2 --expect false"/> |
| 36 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 37 | <step name="Distributed-Primitive-Value.Test-Value-Not-Updated-After-CAS" |
| 38 | requires="Distributed-Primitive-Value.Test-Value-CompareAndSet-False" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 39 | exec="onos-cluster-execute-expect value-test test-value get --expect v0"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 40 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 41 | <step name="Distributed-Primitive-Value.Test-Value-CompareAndSet-True" |
| 42 | requires="Distributed-Primitive-Value.Test-Value-Not-Updated-After-CAS" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 43 | exec="onos-execute-expect ${OCI} value-test test-value compareAndSet v0 v1 --expect true"/> |
| 44 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 45 | <step name="Distributed-Primitive-Value.Test-Value-Updated-After-CAS" |
| 46 | requires="Distributed-Primitive-Value.Test-Value-CompareAndSet-True" |
Madan Jampani | 145623d | 2016-07-22 14:55:57 -0700 | [diff] [blame] | 47 | exec="onos-cluster-execute-expect value-test test-value get --expect v1"/> |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 48 | |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 49 | <step name="Distributed-Primitive-Value.Destroy-Value" |
| 50 | requires="Distributed-Primitive-Value.Test-Value-Updated-After-CAS" |
Ray Milkey | 685e34d | 2016-09-01 12:01:09 -0700 | [diff] [blame] | 51 | exec="onos ${OCI} value-test test-value set null"/> |
| 52 | |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 53 | <!--Check with check logs--> |
Jon Hall | da9fd4a | 2017-02-16 14:23:38 -0800 | [diff] [blame] | 54 | <step name="Distributed-Primitive-Value.Check-Log-Exceptions" |
| 55 | requires="Distributed-Primitive-Value.Destroy-Value" |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 56 | exec="onos-check-logs ${OCI}"/> |
| 57 | |
Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 58 | </group> |
| 59 | </scenario> |
| 60 | |