Skip to content

Commit

Permalink
GemServer>>waitForStartGems: waits for pid file to appear ... better …
Browse files Browse the repository at this point in the history
…than a fixed Delay in tests ... i hope
  • Loading branch information
dalehenrich committed May 28, 2015
1 parent 41bedb3 commit bbfa7c9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
service instance-control
waitForStartGems: timeOutSeconds
| pidList count |
pidList := ''.
count := 0.
self logControlEvent: 'Wait for Gems: ' , self name.
self portOrResourceNameList
do: [ :portOrResourceName |
| pidFilePath file |
pidFilePath := self gemPidFileName: portOrResourceName.
[ GsFile existsOnServer: pidFilePath ]
whileFalse: [
(Delay forSeconds: 1) wait.
count := count + 1.
count > timeOutSeconds
ifTrue: [ ^ false ] ] ].
^ true
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,5 @@
"transactionMutex" : "dkh 12/22/2014 14:48",
"unregister" : "dkh 01/06/2015 13:39",
"validateName:" : "dkh 11/26/2014 18:29",
"waitForStartGems:" : "dkh 05/28/2015 00:47",
"writeGemLogEntryFor:titled:" : "dkh 01/06/2015 16:49" } }
Loading

0 comments on commit bbfa7c9

Please sign in to comment.