Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
07bed612
Commit
07bed612
authored
9 years ago
by
Alexander van Amesfoort
Browse files
Options
Downloads
Patches
Plain Diff
Task #9082: harden tRTmetadataToFile test using netstat
parent
a2026e0b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SubSystems/Online_Cobalt/test/tRTmetadataToFile.run
+13
-3
13 additions, 3 deletions
SubSystems/Online_Cobalt/test/tRTmetadataToFile.run
with
13 additions
and
3 deletions
SubSystems/Online_Cobalt/test/tRTmetadataToFile.run
+
13
−
3
View file @
07bed612
...
@@ -25,9 +25,19 @@ fi
...
@@ -25,9 +25,19 @@ fi
PVSSGatewayStub &
PVSSGatewayStub &
gwPid
=
$!
gwPid
=
$!
# Wait until both services allow connections. This is faster than delaying ~RTmetadata(),
# Wait until PVSSGatewayStub (and ServiceBroker if we started it) are listening.
# since we do binary backoff connection attempts. This also keeps the delay in testing only.
# Just sleep X secs has proven both long and still unreliable.
sleep
2
# often 2 is enough, but when idle, even 5 may not be enough :((((
# (Remaining risk: both services started but PVSSGatewayStub not yet registered at ServiceBroker.)
NETSTAT
=
/bin/netstat
gwReady
=
0
sbReady
=
$((
1
-
$sbPid
))
while
[
$gwReady
-eq
0
-o
$sbReady
-eq
0
]
;
do
echo
'Waiting for PVSSGatewayStub and ServiceBroker listening sockets to show up in netstat...'
>
&2
sleep
0.1
netstatout
=
`
"
$NETSTAT
"
-l
-p
-A
inet
-n
2>/dev/null
`
gwReady
=
`
echo
"
$netstatout
"
|
grep
$gwPid
/ |
wc
-l
`
[
$sbPid
-ne
0
]
&&
sbReady
=
`
echo
"
$netstatout
"
|
grep
$sbPid
/ |
wc
-l
`
done
../../../MAC/MACIO/test/tRTmetadata
>
/dev/null
# logging disrupts output verif
../../../MAC/MACIO/test/tRTmetadata
>
/dev/null
# logging disrupts output verif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment