summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-08-29 07:52:56 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-08-29 07:52:56 +0000
commitbb71830050677e9ea4fbbc3f6593801d3bb7d0aa (patch)
tree2bb7f0770aa0f8ab8b9c15e698d76dfb81e6fc86
parent18214832806a9250ec0a21ff01e66c48ee951d58 (diff)
downloadATCD-bb71830050677e9ea4fbbc3f6593801d3bb7d0aa.tar.gz
Wed Aug 29 07:52:00 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/ChangeLog11
-rw-r--r--TAO/tests/POA/Default_Servant2/File.idl16
-rw-r--r--TAO/tests/POA/Default_Servant2/File_i.cpp11
-rw-r--r--TAO/tests/POA/Default_Servant2/File_i.h6
-rw-r--r--TAO/tests/POA/Default_Servant2/client.cpp2
-rwxr-xr-xTAO/tests/POA/Default_Servant2/run_test.pl2
-rw-r--r--TAO/tests/POA/Default_Servant2/server.cpp2
7 files changed, 38 insertions, 12 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 4a8fc74d870..6c4d00a6abd 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,14 @@
+Wed Aug 29 07:52:00 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tests/POA/Default_Servant2/client.cpp:
+ * tests/POA/Default_Servant2/File.idl:
+ * tests/POA/Default_Servant2/File_i.cpp:
+ * tests/POA/Default_Servant2/File_i.h:
+ * tests/POA/Default_Servant2/run_test.pl:
+ * tests/POA/Default_Servant2/server.cpp:
+ Added a shutdown call to the server so that we shutdown nicely,
+ fixes the crash of this test on OpenVMS
+
Tue Aug 28 20:48:47 UTC 2007 Steve Huston <shuston@riverace.com>
* tests/Param_Test/run_test.pl: Added missing config argument to
diff --git a/TAO/tests/POA/Default_Servant2/File.idl b/TAO/tests/POA/Default_Servant2/File.idl
index eeaa55e1d7e..c7476b120b9 100644
--- a/TAO/tests/POA/Default_Servant2/File.idl
+++ b/TAO/tests/POA/Default_Servant2/File.idl
@@ -15,17 +15,17 @@
// IDL
-module File
+module File
{
- exception IOError
+ exception IOError
{
long error;
};
- interface Descriptor
+ interface Descriptor
{
typedef sequence<octet> DataBuffer;
-
+
long write (in DataBuffer buffer)
raises (IOError);
// write buffer to File
@@ -43,11 +43,13 @@ module File
// destroy the descriptor
};
- interface System
+ interface System
{
+ /// File open operation
Descriptor open (in string file_name,
in long flags)
raises (IOError);
- // File open operation
- };
+
+ oneway void shutdown ();
+ };
};
diff --git a/TAO/tests/POA/Default_Servant2/File_i.cpp b/TAO/tests/POA/Default_Servant2/File_i.cpp
index 92b1ad8865c..4e355a75a8c 100644
--- a/TAO/tests/POA/Default_Servant2/File_i.cpp
+++ b/TAO/tests/POA/Default_Servant2/File_i.cpp
@@ -23,8 +23,9 @@
ACE_RCSID(Default_Servant, File_i, "$Id$")
// IDL File::System constructor
-FileImpl::System::System (PortableServer::POA_ptr poa)
- : poa_ (PortableServer::POA::_duplicate (poa)),
+FileImpl::System::System (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa)
+ : orb_ (CORBA::ORB::_duplicate (orb)),
+ poa_ (PortableServer::POA::_duplicate (poa)),
// Create the Default Descriptor Servant
fd_servant_ (poa)
{
@@ -81,6 +82,12 @@ FileImpl::System::open (const char *file_name,
return fd._retn ();
}
+void
+FileImpl::System::shutdown (void)
+{
+ this->orb_->shutdown (0);
+}
+
// IDL File::Descriptor constructor
FileImpl::Descriptor::Descriptor (PortableServer::POA_ptr poa)
: poa_ (PortableServer::POA::_duplicate (poa))
diff --git a/TAO/tests/POA/Default_Servant2/File_i.h b/TAO/tests/POA/Default_Servant2/File_i.h
index 3b4858c1c18..5c5de0a4da4 100644
--- a/TAO/tests/POA/Default_Servant2/File_i.h
+++ b/TAO/tests/POA/Default_Servant2/File_i.h
@@ -62,7 +62,8 @@ public:
// = TITLE
// File System implementation class.
public:
- System (PortableServer::POA_ptr poa);
+ System (CORBA::ORB_ptr orb,
+ PortableServer::POA_ptr poa);
// Constructor, Creates a single File Descriptor Servant and
// registers it with the POA as the Default Servant
@@ -77,7 +78,10 @@ public:
// Opens a file ,creates a Descriptor reference with the
// ACE_HANDLE and returns that reference
+ void shutdown (void);
private:
+ CORBA::ORB_var orb_;
+
PortableServer::POA_var poa_;
Descriptor fd_servant_;
diff --git a/TAO/tests/POA/Default_Servant2/client.cpp b/TAO/tests/POA/Default_Servant2/client.cpp
index 99f2055d54a..8af0ff747e0 100644
--- a/TAO/tests/POA/Default_Servant2/client.cpp
+++ b/TAO/tests/POA/Default_Servant2/client.cpp
@@ -135,6 +135,8 @@ main (int argc, char **argv)
// close the file
fd->destroy ();
+
+ file_system->shutdown ();
}
catch (const CORBA::Exception& ex)
{
diff --git a/TAO/tests/POA/Default_Servant2/run_test.pl b/TAO/tests/POA/Default_Servant2/run_test.pl
index cc8d5e60039..bd7952ed0db 100755
--- a/TAO/tests/POA/Default_Servant2/run_test.pl
+++ b/TAO/tests/POA/Default_Servant2/run_test.pl
@@ -36,7 +36,7 @@ if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_cr
}
$client = $CL->SpawnWaitKill (60);
-$server = $SV->TerminateWaitKill (15);
+$server = $SV->WaitKill (15);
unlink $iorfile;
unlink "test"; # created by the program
diff --git a/TAO/tests/POA/Default_Servant2/server.cpp b/TAO/tests/POA/Default_Servant2/server.cpp
index 58e785b9d62..315ac7472c7 100644
--- a/TAO/tests/POA/Default_Servant2/server.cpp
+++ b/TAO/tests/POA/Default_Servant2/server.cpp
@@ -116,7 +116,7 @@ main (int argc, char **argv)
}
// Create a File System Implementation object in first_poa
- FileImpl::System file_system_impl (first_poa.in ());
+ FileImpl::System file_system_impl (orb.in (), first_poa.in ());
PortableServer::ObjectId_var file_system_oid =
PortableServer::string_to_ObjectId ("FileSystem");