Skip to content

Commit

Permalink
Removing tests which do not show known use cases
Browse files Browse the repository at this point in the history
  • Loading branch information
adebonis committed Sep 25, 2024
1 parent b940618 commit 4a5de0a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,34 +62,6 @@ GemStoneRepositoryProviderTest >> testExceptionsAbortTransactionsUntilHandled [
self assertTheOnlyOneInTheRepositoryIsSilvesterStallone
]

{ #category : 'tests - conflict checking' }
GemStoneRepositoryProviderTest >> testPurgeInSimultaneous [

| semaphore previous |

previous := System transactionMode.
[
System transactionMode: #manualBegin.
semaphore := Semaphore new.
self
setUpRepositoryProvidedBy: ( SemaphorizedGemStoneRepositoryProvider waitingOn: semaphore )
with:
( CriteriaBasedConflictCheckingStrategy forSingleAspectMatching: [ :person | person firstName ] ).
[ self extraterrestrials store: self silvesterStallone ] fork.
Processor yield.
semaphore signal.
[ self extraterrestrials purge: self silvesterStallone ] fork.
Processor yield.
[ self should: [ self extraterrestrials purge: self silvesterStallone ] raise: ObjectNotFound ]
fork.
Processor yield.
semaphore signal.
semaphore signal.
Processor yield.
self assert: self extraterrestrials findAll isEmpty
] ensure: [ System transactionMode: previous ]
]

{ #category : 'tests' }
GemStoneRepositoryProviderTest >> testQueryReturningBeforeAllIndexedResultsAreRead [

Expand Down Expand Up @@ -455,39 +427,6 @@ GemStoneRepositoryProviderTest >> testSpaceshipWhenUsingIdentityIndex [
]
]

{ #category : 'tests - conflict checking' }
GemStoneRepositoryProviderTest >> testStoreInSimultaneous [

| semaphore previous |

previous := System transactionMode.
[
System transactionMode: #manualBegin.
semaphore := Semaphore new.
self
setUpRepositoryProvidedBy: ( SemaphorizedGemStoneRepositoryProvider waitingOn: semaphore )
with:
( CriteriaBasedConflictCheckingStrategy forSingleAspectMatching: [ :person | person firstName ] ).
[ self extraterrestrials store: self silvesterStallone ] fork.
Processor yield.
[
self
should: [ self extraterrestrials store: self silvesterStallone ]
raise: ConflictingObjectFound
withMessageText: 'Something is in conflict with Stallone, Silvester'
] fork.
Processor yield.
semaphore signal.
semaphore signal.
Processor yield.
self withTheOnlyOneIn: self extraterrestrials findAll do: [ :extraterrestrial |
self
assert: extraterrestrial firstName equals: 'Silvester';
assert: extraterrestrial lastName equals: 'Stallone'
]
] ensure: [ System transactionMode: previous ]
]

{ #category : 'tests' }
GemStoneRepositoryProviderTest >> testStreamQueryResults [

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,6 @@ SemaphorizedGemStoneRepository class >> checkingConflictsAccordingTo: aConflictC
^ self new initializeCheckingConflictsAccordingTo: aConflictCheckingStrategy waitingOn: aSemaphore
]

{ #category : 'private - preconditions' }
SemaphorizedGemStoneRepository >> assertIncludes: aDomainObject [

super assertIncludes: aDomainObject.
semaphore wait
]

{ #category : 'private - preconditions' }
SemaphorizedGemStoneRepository >> assertNoConflictsFor: aDomainObject [

super assertNoConflictsFor: aDomainObject.
semaphore wait
]

{ #category : 'initialization' }
SemaphorizedGemStoneRepository >> initializeCheckingConflictsAccordingTo: aConflictCheckingStrategy waitingOn: aSemaphore [

Expand Down

0 comments on commit 4a5de0a

Please sign in to comment.