summaryrefslogtreecommitdiff
path: root/ACE/TAO/orbsvcs/tests/Bug_3418_Regression/Test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/TAO/orbsvcs/tests/Bug_3418_Regression/Test.cpp')
-rw-r--r--ACE/TAO/orbsvcs/tests/Bug_3418_Regression/Test.cpp69
1 files changed, 69 insertions, 0 deletions
diff --git a/ACE/TAO/orbsvcs/tests/Bug_3418_Regression/Test.cpp b/ACE/TAO/orbsvcs/tests/Bug_3418_Regression/Test.cpp
new file mode 100644
index 00000000000..124ac3c41bb
--- /dev/null
+++ b/ACE/TAO/orbsvcs/tests/Bug_3418_Regression/Test.cpp
@@ -0,0 +1,69 @@
+#include "tao/corba.h"
+#include "ace/ARGV.h"
+#include "ace/Dynamic_Service.h"
+
+ACE_RCSID (tests,
+ server,
+ "$Id$")
+
+// SSLIOP
+const ACE_TCHAR argStrB[] = ACE_TEXT("BBB -ORBGestalt LOCAL -ORBId ORB-B -ORBSvcConf b.conf");
+
+// empty file
+const ACE_TCHAR argStrM[] = ACE_TEXT("MMM -ORBGestalt LOCAL -ORBId ORB-M -ORBSvcConf m.conf");
+
+int
+ACE_TMAIN (int, ACE_TCHAR **)
+{
+ int error = 0;
+
+ try
+ {
+ ACE_ARGV argM (argStrM);
+ int n = argM.argc ();
+ CORBA::ORB_var ORBM =
+ CORBA::ORB_init (n, argM.argv ());
+
+ if (CORBA::is_nil (ORBM.in ()))
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ ACE_TEXT("Expected to get an ORB\n")),
+ -1);
+
+ // SSLIOP
+ ACE_ARGV argB (argStrB);
+ n = argB.argc ();
+ CORBA::ORB_var ORBB =
+ CORBA::ORB_init (n, argB.argv ());
+
+ if (CORBA::is_nil (ORBB.in ()))
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ ACE_TEXT("Expected to get an ORB\n")),
+ -1);
+
+ // Since each svc conf file causes the ORB to load the services in
+ // its own service space no services are reachable through the
+ // global service repo
+
+ // SSLIOP
+ ACE_Service_Object *ssliop_so =
+ ACE_Dynamic_Service<ACE_Service_Object>::instance ("SSLIOP_Factory");
+ if (ssliop_so != 0)
+ {
+ ++error;
+ ACE_ERROR ((LM_DEBUG,
+ ACE_TEXT("Unexpected to find ")
+ ACE_TEXT("SSLIOP_Factory globally\n")));
+ }
+
+ ORBM->destroy();
+
+ ORBB->destroy();
+ }
+ catch(const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Unhandled exception caught");
+ return -1;
+ }
+
+ return error;
+}