blob: b9fdb3a3cac674d7d579ebda27977949f73b420a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
& eval 'exec perl -S $0 $argv:q'
if 0;
# $Id$
# -*- perl -*-
use lib '../../../../../bin';
use PerlACE::Run_Test;
$status = 0;
$iorfile = PerlACE::LocalFile ("ec.ior");
$conffile = PerlACE::LocalFile ("ec.conf");
unlink $iorfile;
$T = new PerlACE::Process ("Service",
"-ORBsvcconf $conffile -o $iorfile");
$C = new PerlACE::Process ("Consumer",
"file://$iorfile");
$S = new PerlACE::Process ("Supplier",
"file://$iorfile");
$T->Spawn ();
if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
$T->Kill ();
exit 1;
}
$C->Spawn ();
sleep 5;
$supplier = $S->SpawnWaitKill (120);
if ($supplier != 0) {
print STDERR "ERROR: supplier returned $supplier\n";
$status = 1;
}
$consumer = $C->WaitKill (15);
if ($consumer != 0) {
print STDERR "ERROR: consumer returned $consumer\n";
$status = 1;
}
$service = $T->TerminateWaitKill (5);
if ($service != 0) {
print STDERR "ERROR: service returned $service\n";
$status = 1;
}
unlink $iorfile;
exit $status;
|