-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GemServer>>waitForStartGems: waits for pid file to appear ... better …
…than a fixed Delay in tests ... i hope
- Loading branch information
1 parent
41bedb3
commit bbfa7c9
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
repository/GsApplicationTools-Server.package/GemServer.class/instance/waitForStartGems..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.