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.
Issue #16: add a transactional test case ...
- Loading branch information
1 parent
72fa2e0
commit a312674
Showing
11 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
repository/GsApplicationTools-Test.package/GemServerTestServer.class/class/persistentRoot.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,4 @@ | ||
accessing | ||
persistentRoot | ||
PersistentRoot ifNil: [ PersistentRoot := Dictionary new ]. | ||
^ PersistentRoot |
3 changes: 3 additions & 0 deletions
3
...ry/GsApplicationTools-Test.package/GemServerTestServer.class/class/resetPersistentRoot.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 @@ | ||
accessing | ||
resetPersistentRoot | ||
PersistentRoot := nil |
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
5 changes: 5 additions & 0 deletions
5
.../GsApplicationTools-Test.package/GemServerTestServer.class/instance/performTransaction.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,5 @@ | ||
actions | ||
performTransaction | ||
actionResult := messageObject + 1. | ||
self class persistentRoot at: #'performTransaction' put: actionResult. | ||
self logAction: #'performTransaction' |
6 changes: 0 additions & 6 deletions
6
...ionTools-Test.package/GemServerTestServer.class/instance/testReentrantTransactionError.st
This file was deleted.
Oops, something went wrong.
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
20 changes: 20 additions & 0 deletions
20
repository/GsApplicationTools-Test.package/GemServerTests.class/instance/testTransaction.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,20 @@ | ||
tests | ||
testTransaction | ||
| gemServer | | ||
gemServer := self createGemServer. | ||
gemServer class resetPersistentRoot. | ||
System commitTransaction. | ||
gemServer scriptLogEvent: '---->testTransaction' object: gemServer. | ||
[ | ||
self startGems: gemServer. | ||
self waitForActionResult: gemServer. | ||
self assert: gemServer actionResult == #'started'. | ||
gemServer performMessage: #'transaction' with: 41. | ||
self waitForActionResult: gemServer. | ||
self assert: gemServer actionResult == 42. | ||
self assert: (gemServer class persistentRoot at: #'performTransaction') = 42. | ||
gemServer performMessage: #'transaction' with: 45. | ||
self waitForActionResult: gemServer. | ||
self assert: gemServer actionResult == 46. | ||
self assert: (gemServer class persistentRoot at: #'performTransaction') = 46 ] | ||
ensure: [ self stopGems: gemServer ] |
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-Test.package/monticello.meta/version
Large diffs are not rendered by default.
Oops, something went wrong.