summaryrefslogtreecommitdiff
path: root/java/test/Glacier2/router/CallbackClient.java
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2004-11-12 17:31:54 +0000
committerMarc Laukien <marc@zeroc.com>2004-11-12 17:31:54 +0000
commiteca41a54cda3085261df1c38e055577e643bc847 (patch)
treeb04c2ab447219f7c8f49637cb2b57fbe9c3ed8aa /java/test/Glacier2/router/CallbackClient.java
parentfixing type id (diff)
downloadice-eca41a54cda3085261df1c38e055577e643bc847.tar.bz2
ice-eca41a54cda3085261df1c38e055577e643bc847.tar.xz
ice-eca41a54cda3085261df1c38e055577e643bc847.zip
Glacier2 test update
Diffstat (limited to 'java/test/Glacier2/router/CallbackClient.java')
-rw-r--r--java/test/Glacier2/router/CallbackClient.java50
1 files changed, 46 insertions, 4 deletions
diff --git a/java/test/Glacier2/router/CallbackClient.java b/java/test/Glacier2/router/CallbackClient.java
index 4a38723882b..c9cab08f6b5 100644
--- a/java/test/Glacier2/router/CallbackClient.java
+++ b/java/test/Glacier2/router/CallbackClient.java
@@ -61,7 +61,7 @@ class CallbackClient extends Ice.Application
{
System.out.print("testing stringToProxy for server object... ");
System.out.flush();
- base = communicator().stringToProxy("callback:tcp -p 12345 -t 10000");
+ base = communicator().stringToProxy("c1/callback:tcp -p 12345 -t 10000");
System.out.println("ok");
}
@@ -86,7 +86,7 @@ class CallbackClient extends Ice.Application
System.out.flush();
try
{
- session = router.createSession("dummy", "xxx");
+ session = router.createSession("userid", "xxx");
test(false);
}
catch(Glacier2.PermissionDeniedException ex)
@@ -118,7 +118,7 @@ class CallbackClient extends Ice.Application
System.out.flush();
try
{
- session = router.createSession("dummy", "abc123");
+ session = router.createSession("userid", "abc123");
}
catch(Glacier2.PermissionDeniedException ex)
{
@@ -136,7 +136,7 @@ class CallbackClient extends Ice.Application
System.out.flush();
try
{
- router.createSession("dummy", "abc123");
+ router.createSession("userid", "abc123");
test(false);
}
catch(Glacier2.PermissionDeniedException ex)
@@ -261,6 +261,48 @@ class CallbackClient extends Ice.Application
}
}
+ {
+ System.out.print("testing whether other allowed category is accepted... ");
+ System.out.flush();
+ java.util.Map context = new java.util.HashMap();
+ context.put("_fwd", "t");
+ CallbackPrx otherCategoryTwoway = CallbackPrxHelper.uncheckedCast(
+ twoway.ice_newIdentity(Ice.Util.stringToIdentity("c2/callback")));
+ otherCategoryTwoway.initiateCallback(twowayR, context);
+ test(callbackReceiverImpl.callbackOK());
+ System.out.println("ok");
+ }
+
+ {
+ System.out.print("testing whether disallowed category gets rejected... ");
+ System.out.flush();
+ java.util.Map context = new java.util.HashMap();
+ context.put("_fwd", "t");
+ try
+ {
+ CallbackPrx otherCategoryTwoway = CallbackPrxHelper.uncheckedCast(
+ twoway.ice_newIdentity(Ice.Util.stringToIdentity("c3/callback")));
+ otherCategoryTwoway.initiateCallback(twowayR, context);
+ test(false);
+ }
+ catch(Ice.ObjectNotExistException ex)
+ {
+ System.out.println("ok");
+ }
+ }
+
+ {
+ System.out.print("testing whether user-id as category is accepted... ");
+ System.out.flush();
+ java.util.Map context = new java.util.HashMap();
+ context.put("_fwd", "t");
+ CallbackPrx otherCategoryTwoway = CallbackPrxHelper.uncheckedCast(
+ twoway.ice_newIdentity(Ice.Util.stringToIdentity("_userid/callback")));
+ otherCategoryTwoway.initiateCallback(twowayR, context);
+ test(callbackReceiverImpl.callbackOK());
+ System.out.println("ok");
+ }
+
{
System.out.print("testing server shutdown... ");
System.out.flush();