summaryrefslogtreecommitdiff
path: root/tests/IOStream_Test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/IOStream_Test.cpp')
-rw-r--r--tests/IOStream_Test.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/IOStream_Test.cpp b/tests/IOStream_Test.cpp
index b760bf3e28e..c496e4e2a97 100644
--- a/tests/IOStream_Test.cpp
+++ b/tests/IOStream_Test.cpp
@@ -199,11 +199,31 @@ client (void *arg = 0)
ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client Receiving\n"));
+ ACE_Time_Value timeout (2);
+ ACE_Time_Value *timeoutp = &timeout;
+
+ server >> timeoutp;
+
int i;
float f1, f2;
long l;
double d;
- server >> i;
+
+ while( !(server >> i) )
+ {
+ int eof = server.eof();
+ if( eof )
+ {
+ ACE_DEBUG((LM_DEBUG, "(%P|%t) Unrecoverable stream error/eof\n" ));
+ break;
+ }
+ else
+ {
+ ACE_DEBUG((LM_DEBUG, "(%P|%t) Recoverable stream error (timeout)\n" ));
+ server.clear(0);
+ }
+ }
+
server >> f1;
server >> l;
server >> f2;
@@ -320,6 +340,10 @@ server (void *arg = 0)
// filled or when we flush it with an explicit client.sync() command
// or the implicit <<endl.
+
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server sleeping\n" ));
+ ACE_OS::sleep(30);
+
ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server Sending: 1 .12342134 666555444 23.45 -46.5e9 \n"));
client_handler << 1 << " ";
client_handler << .12342134 << " ";