Steven Glenn Jacobs | 409c3e7 | 2016-09-14 11:32:13 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Description : Check the Plan for Unsubscribing to a channel |
| 3 | * Expected Res : Success |
| 4 | * Date : Mar 2015 |
| 5 | */ |
| 6 | |
Steven Glenn Jacobs | d0ec837 | 2016-12-07 11:00:08 -0800 | [diff] [blame] | 7 | drop dataverse channels3 if exists; |
| 8 | create dataverse channels3; |
| 9 | use dataverse channels3; |
Steven Glenn Jacobs | 409c3e7 | 2016-09-14 11:32:13 -0700 | [diff] [blame] | 10 | |
| 11 | |
| 12 | create type TweetMessageTypeuuid as closed { |
| 13 | tweetid: uuid, |
| 14 | sender-location: point, |
| 15 | send-time: datetime, |
| 16 | referred-topics: {{ string }}, |
| 17 | message-text: string, |
| 18 | countA: int32, |
| 19 | countB: int32 |
| 20 | } |
| 21 | |
| 22 | |
| 23 | create dataset TweetMessageuuids(TweetMessageTypeuuid) |
| 24 | primary key tweetid autogenerated; |
| 25 | |
| 26 | create function NearbyTweetsContainingText($location, $text) { |
| 27 | for $tweet in dataset TweetMessageuuids |
| 28 | let $circle := create-circle($location,30.0) |
| 29 | where contains($tweet.message-text,$text) |
| 30 | and spatial-intersect($tweet.sender-location, $location) |
| 31 | return $tweet.message-text |
| 32 | }; |
| 33 | |
| 34 | create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M"); |
| 35 | |
| 36 | write output to nc1:"rttest/channel-unsubscribe.adm"; |
| 37 | |
| 38 | unsubscribe "c45ef6d0-c5ae-4b9e-b5da-cf1932718296" from nearbyTweetChannel; |