forked from dalehenrich/gsApplicationTools
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from GsDevKit/issue_19
Issue #19: it turns out that the `initCrashLog` call in GemServer>>start...
- Loading branch information
Showing
39 changed files
with
88 additions
and
38 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
...Tools-ExampleV31.package/GemServerRemoteServerExampleTests.class/instance/restartGems..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,3 @@ | ||
private | ||
restartGems: gemServer | ||
gemServer restartGems |
2 changes: 1 addition & 1 deletion
2
...ampleV31.package/GemServerRemoteServerExampleTests.class/instance/runTest.client.task..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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
tests | ||
private | ||
runTest: gemServer client: client task: task | ||
[ | ||
self startGems: gemServer. | ||
|
1 change: 1 addition & 0 deletions
1
...onTools-ExampleV31.package/GemServerRemoteServerExampleTests.class/instance/startGems..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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
private | ||
startGems: gemServer | ||
gemServer initCrashLog. "make sure we have a clean slate when starting up" | ||
gemServer startGems |
23 changes: 23 additions & 0 deletions
23
...31.package/GemServerRemoteServerExampleTests.class/instance/testStartRestartStopServer.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,23 @@ | ||
tests | ||
testStartRestartStopServer | ||
"just start/restart/stop ... without an http client cannot do much else" | ||
|
||
"https://github.com/GsDevKit/gsApplicationTools/issues/19" | ||
|
||
| gemServer | | ||
gemServer := GemServer gemServerNamed: self gemServerName. | ||
gemServer tracing: true. | ||
gemServer scriptLogEvent: '---->testStartRestartStopServer' object: gemServer. | ||
[ | ||
| portCount | | ||
self startGems: gemServer. | ||
(Delay forSeconds: 3) wait. | ||
portCount := self validatePidFile: gemServer shouldExist: true. | ||
self assert: portCount = gemServer defaultPortOrResourceNameList size. | ||
gemServer restartGems. | ||
(Delay forSeconds: 3) wait. | ||
self validatePidFile: gemServer shouldExist: true ] | ||
ensure: [ | ||
self stopGems: gemServer. | ||
(Delay forSeconds: 3) wait. | ||
self validatePidFile: gemServer shouldExist: false ] |
16 changes: 16 additions & 0 deletions
16
....package/GemServerRemoteServerExampleTests.class/instance/validatePidFile.shouldExist..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,16 @@ | ||
private | ||
validatePidFile: gemServer shouldExist: shouldExist | ||
| portCount | | ||
portCount := 0. | ||
gemServer defaultPortOrResourceNameList | ||
do: [ :defaultPortOrResourceName | | ||
| fileName | | ||
portCount := portCount + 1. | ||
fileName := gemServer gemPidFileName: defaultPortOrResourceName. | ||
ServerFileDirectory | ||
splitName: fileName | ||
to: [ :dirPath :fileName | | ||
| dir x | | ||
dir := ServerFileDirectory on: dirPath. | ||
self assert: (x := dir fileExists: fileName) == shouldExist ] ]. | ||
^ portCount |
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
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
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
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
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
1 change: 1 addition & 0 deletions
1
...onTools-ExampleV31.package/GemServerSeasideStyleExampleTests.class/instance/startGems..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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
private | ||
startGems: gemServer | ||
gemServer initCrashLog. | ||
gemServer startGems |
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
2 changes: 1 addition & 1 deletion
2
repository/GsApplicationTools-ExampleV31.package/monticello.meta/version
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
repository/GsApplicationTools-Server.package/GemServer.class/instance/isRunning.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
server specialization | ||
isRunning | ||
^self serverClass isRunning | ||
^self serverClass isRunning |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ accessing | |
name | ||
|
||
name == nil ifTrue: [ ^self serverClass name ]. | ||
^name | ||
^name |
9 changes: 6 additions & 3 deletions
9
repository/GsApplicationTools-Server.package/GemServer.class/instance/startGems.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
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
2 changes: 1 addition & 1 deletion
2
repository/GsApplicationTools-Server.package/GemServerLauncher.class/instance/block..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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
block: anObject | ||
|
||
block := anObject | ||
block := anObject |
2 changes: 1 addition & 1 deletion
2
...tory/GsApplicationTools-Server.package/GemServerLauncher.class/instance/nativeProcess..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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
nativeProcess: anObject | ||
|
||
nativeProcess := anObject | ||
nativeProcess := anObject |
2 changes: 1 addition & 1 deletion
2
...itory/GsApplicationTools-Server.package/GemServerLauncher.class/instance/nativeProcess.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
nativeProcess | ||
|
||
^nativeProcess | ||
^nativeProcess |
2 changes: 1 addition & 1 deletion
2
...ry/GsApplicationTools-Server.package/GemServerLauncher.class/instance/nativeSemaphore..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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
nativeSemaphore: anObject | ||
|
||
nativeSemaphore := anObject | ||
nativeSemaphore := anObject |
2 changes: 1 addition & 1 deletion
2
...ry/GsApplicationTools-Server.package/GemServerLauncher.class/instance/portableProcess..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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
portableProcess: anObject | ||
|
||
portableProcess := anObject | ||
portableProcess := anObject |
2 changes: 1 addition & 1 deletion
2
...ory/GsApplicationTools-Server.package/GemServerLauncher.class/instance/portableProcess.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
portableProcess | ||
|
||
^portableProcess | ||
^portableProcess |
2 changes: 1 addition & 1 deletion
2
.../GsApplicationTools-Server.package/GemServerLauncher.class/instance/portableSemaphore..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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
portableSemaphore: anObject | ||
|
||
portableSemaphore := anObject | ||
portableSemaphore := anObject |
2 changes: 1 addition & 1 deletion
2
...sitory/GsApplicationTools-Server.package/GemServerRegistry.class/class/gemServerNamed..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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
gem server querying | ||
gemServerNamed: aString | ||
^self singleton serverNamed: aString | ||
^self singleton serverNamed: aString |
2 changes: 1 addition & 1 deletion
2
repository/GsApplicationTools-Server.package/GemServerRegistry.class/class/gemServerNames.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
gem server querying | ||
gemServerNames | ||
^self singleton names asSortedCollection | ||
^self singleton names asSortedCollection |
2 changes: 1 addition & 1 deletion
2
repository/GsApplicationTools-Server.package/GemServerRegistry.class/class/new.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
instance creation | ||
new | ||
^self singleton | ||
^self singleton |
2 changes: 1 addition & 1 deletion
2
.../GsApplicationTools-Server.package/GemServerRegistry.class/class/removeGemServerNamed..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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
registration | ||
removeGemServerNamed: aName | ||
self singleton removeServer: aName | ||
. | ||
. |
2 changes: 1 addition & 1 deletion
2
repository/GsApplicationTools-Server.package/GemServerRegistry.class/class/serverGems.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
gem server querying | ||
serverGems | ||
^self singleton servers | ||
^self singleton servers |
2 changes: 1 addition & 1 deletion
2
repository/GsApplicationTools-Server.package/GemServerRegistry.class/class/serversOnPort..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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
gem server querying | ||
serversOnPort: aPortNumber | ||
^self singleton serversOnPort: aPortNumber | ||
^self singleton serversOnPort: aPortNumber |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ accessing | |
singleton | ||
|
||
Singleton isNil ifTrue: [self initSingleton]. | ||
^Singleton | ||
^Singleton |
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
2 changes: 1 addition & 1 deletion
2
repository/GsApplicationTools-Server.package/GemServerRegistry.class/instance/names.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
other | ||
names | ||
|
||
^self servers collect:[:each | each name]. | ||
^self servers collect:[:each | each name]. |
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
2 changes: 1 addition & 1 deletion
2
...itory/GsApplicationTools-Server.package/GemServerRegistry.class/instance/serverClasses.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
other | ||
serverClasses | ||
|
||
^self servers collect:[:each | each serverClass]. | ||
^self servers collect:[:each | each serverClass]. |
2 changes: 1 addition & 1 deletion
2
...sitory/GsApplicationTools-Server.package/GemServerRegistry.class/instance/serverNamed..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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
other | ||
serverNamed: aString | ||
^self servers detect:[:each | each name = aString] ifNone:[nil] | ||
^self servers detect:[:each | each name = aString] ifNone:[nil] |
2 changes: 1 addition & 1 deletion
2
repository/GsApplicationTools-Server.package/GemServerRegistry.class/instance/servers.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
other | ||
servers | ||
^servers | ||
^servers |
2 changes: 1 addition & 1 deletion
2
...ory/GsApplicationTools-Server.package/GemServerRegistry.class/instance/serversOfClass..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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
other | ||
serversOfClass: aClassName | ||
^servers select: [:each | each serverClass name = aClassName] | ||
^servers select: [:each | each serverClass name = aClassName] |
2 changes: 1 addition & 1 deletion
2
repository/GsApplicationTools-Server.package/monticello.meta/version
Large diffs are not rendered by default.
Oops, something went wrong.