Skip to content

Commit ddac49b

Browse files
committed
Fix failures
1 parent 3da3a1f commit ddac49b

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

tests/DCPS/RecorderReplayer/Args.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const char* ACTOR_REPLAYER = "Replayer";
2121
const char* ACTOR_SUBSCRIBER = "Subscriber";
2222

2323
const char* EVENT_RECORDER_JOINED = "RecorderJoined";
24-
const char* EVENT_RECEIVED_ALL_SAMPLES = "ReceivedAllSamples";
24+
const char* EVENT_RECORDER_RECEIVED_ALL_SAMPLES = "RecorderReceivedAllSamples";
2525
const char* EVENT_SUBSCRIBER_JOINED = "SubscriberJoined";
2626

2727
const int NUM_SAMPLES = 10;

tests/DCPS/RecorderReplayer/Publisher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ int ACE_TMAIN(int argc, ACE_TCHAR *argv[])
143143
}
144144

145145
// Wait until all samples are received by the Recorder
146-
dcs->wait_for(ACTOR_PUBLISHER, ACTOR_RECORDER, EVENT_RECEIVED_ALL_SAMPLES);
146+
dcs->wait_for(ACTOR_PUBLISHER, ACTOR_RECORDER, EVENT_RECORDER_RECEIVED_ALL_SAMPLES);
147147

148148
ACE_DEBUG((LM_DEBUG, "(%P|%t) Stop publisher\n"));
149149

tests/DCPS/RecorderReplayer/Relay.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ class MessengerReplayerListener : public OpenDDS::DCPS::ReplayerListener {
3838
const ::DDS::PublicationMatchedStatus & status)
3939
{
4040
if (status.current_count > 0 ) {
41-
ACE_DEBUG((LM_DEBUG,
42-
ACE_TEXT("MessengerReplayerListener -- a reader connect to replayer\n")));
41+
ACE_DEBUG((LM_DEBUG, "MessengerReplayerListener -- a reader connect to replayer\n"));
4342
connected_readers_.insert(status.last_subscription_handle);
4443
} else if (status.current_count == 0 && status.total_count > 0) {
45-
ACE_DEBUG((LM_DEBUG,
46-
ACE_TEXT("MessengerRecorderListener -- reader disconnect with replayer\n")));
44+
ACE_DEBUG((LM_DEBUG, "MessengerReplayerListener -- reader disconnect with replayer\n"));
4745
}
4846
}
4947

@@ -74,11 +72,10 @@ class MessengerRecorderListener : public OpenDDS::DCPS::RecorderListener {
7472
virtual void on_sample_data_received(OpenDDS::DCPS::Recorder*,
7573
const OpenDDS::DCPS::RawDataSample& sample)
7674
{
77-
ACE_DEBUG((LM_DEBUG,
78-
ACE_TEXT("MessengerRecorderListener::on_sample_data_received\n")));
75+
ACE_DEBUG((LM_DEBUG, "MessengerRecorderListener::on_sample_data_received\n"));
7976

8077
if (++sample_count_ >= NUM_SAMPLES) {
81-
dcs_->post(ACTOR_RECORDER, EVENT_RECEIVED_ALL_SAMPLES);
78+
dcs_->post(ACTOR_RECORDER, EVENT_RECORDER_RECEIVED_ALL_SAMPLES);
8279
}
8380

8481
MessengerReplayerListener* replayer_listener =
@@ -116,7 +113,7 @@ class MessengerRecorderListener : public OpenDDS::DCPS::RecorderListener {
116113
{
117114
// In the main thread, wait for the publisher to associate
118115
ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, match_status_mutex_, -1);
119-
while (match_status_ == UNMATCHED) {
116+
while (match_status_ != MATCHED) {
120117
if (match_cond_.wait() != 0) {
121118
return -1;
122119
}
@@ -128,11 +125,12 @@ class MessengerRecorderListener : public OpenDDS::DCPS::RecorderListener {
128125
{
129126
// In the main thread, wait for the publisher to deassociate
130127
ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, match_status_mutex_, -1);
131-
while (match_status_ == MATCHED) {
128+
while (match_status_ != UNMATCHED) {
132129
if (unmatch_cond_.wait() != 0) {
133130
return -1;
134131
}
135132
}
133+
return 0;
136134
}
137135

138136
private:

tests/DCPS/RecorderReplayer/run_test.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Env (ACE_ROOT);
1212
use lib "$ACE_ROOT/bin";
1313
use PerlDDS::Run_Test;
14+
use File::Path;
1415
use strict;
1516

1617
PerlDDS::add_lib_path('../ConsolidatedMessengerIdl');
@@ -139,7 +140,7 @@
139140
$test->start_process("subscriber");
140141
$test->start_process("relay");
141142

142-
my $result = $test->finish(300);
143+
my $result = $test->finish(60);
143144
if ($result != 0) {
144145
print STDERR "ERROR: test returned $result\n";
145146
$status = 1;

0 commit comments

Comments
 (0)