diff options
author | Thorvald Natvig <slicer@users.sourceforge.net> | 2010-03-18 20:18:21 +0300 |
---|---|---|
committer | Thorvald Natvig <slicer@users.sourceforge.net> | 2010-03-18 20:18:21 +0300 |
commit | 0485e2e69a32e9e08776c83c08cc544183ab61cb (patch) | |
tree | 4d11bc345939817488676b4ed89c1dda4197452e /scripts | |
parent | 77e88482d7cecae4143451be9dfdbf97385ffdca (diff) |
Add timeout to authenticators
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/testauth.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/testauth.py b/scripts/testauth.py index 41a5361ff..ad2e64ce4 100755 --- a/scripts/testauth.py +++ b/scripts/testauth.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -import Ice, sys +import Ice, sys, time from M2Crypto import X509; Ice.loadSlice('Murmur.ice') import Murmur @@ -25,6 +25,8 @@ class ServerAuthenticatorI(Murmur.ServerUpdatingAuthenticator): return (2, "twO", groups) else: return (-1, None, None) + elif (name == "Fail"): + time.sleep(6) return (-2, None, None) def getInfo(self, id, current=None): @@ -87,7 +89,6 @@ if __name__ == "__main__": for server in meta.getBootedServers(): serverR=Murmur.ServerUpdatingAuthenticatorPrx.uncheckedCast(adapter.addWithUUID(ServerAuthenticatorI(server, adapter))) server.setAuthenticator(serverR) -# server.registerUser("TestUser") print "Done" |