source: old/trunk/vtest/subscr.py @ 2598

Revision 2598, 1.7 KB checked in by kcr@…, 20 months ago (diff)

add license

Line 
1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3# Copyright © 2009 by Karl Ramm
4#
5# All rights reserved.
6#
7# Permission to use, copy, modify, and distribute this software and
8# its documentation for any purpose and without fee is hereby granted,
9# provided that the above copyright notice appear in all copies and
10# that both that copyright notice and this permission notice appear in
11# supporting documentation, and that the name of Karl Ramm not be used
12# in advertising or publicity pertaining to distribution of the
13# software without specific, written prior permission.
14#
15# KARL RAMM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
17# NO EVENT SHALL KARL RAMM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
19# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
20# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
21# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22
23import nservers
24
25class TestLongSubs(nservers.TestMultipleServers):
26    def test(self):
27        super(TestLongSubs, self).test()
28       
29        self.client.run('klist')
30
31        zwgc = self.zwgc()
32
33        zwgc.receivetest()
34
35        zwgc.sub('x'*290)
36        zwgc.sub('y'*290)
37        zwgc.sub('z'*290)
38
39        before = zwgc.ret()
40
41        for t in self.servers:
42            t.run('/etc/init.d/zephyrd restart')
43            self.serverwait()
44
45        zwgc.receivetest()
46
47        after = zwgc.ret()
48
49        before.sort()
50        after.sort()
51        assert before == after, "subscriptions changed across restart"
52
53        zwgc.shutdown()
54
55if __name__ == '__main__':
56    TestLongSubs().run()
Note: See TracBrowser for help on using the repository browser.