From 4a5de0adbc7809add3d2686db9f21a509d02c391 Mon Sep 17 00:00:00 2001 From: adebonis Date: Wed, 25 Sep 2024 10:16:02 -0300 Subject: [PATCH] Removing tests which do not show known use cases --- .../GemStoneRepositoryProviderTest.class.st | 61 ------------------- .../SemaphorizedGemStoneRepository.class.st | 14 ----- 2 files changed, 75 deletions(-) diff --git a/source/Sagan-GemStone-Tests/GemStoneRepositoryProviderTest.class.st b/source/Sagan-GemStone-Tests/GemStoneRepositoryProviderTest.class.st index 956fc2c..35c9bd0 100644 --- a/source/Sagan-GemStone-Tests/GemStoneRepositoryProviderTest.class.st +++ b/source/Sagan-GemStone-Tests/GemStoneRepositoryProviderTest.class.st @@ -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 [ @@ -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 [ diff --git a/source/Sagan-GemStone-Tests/SemaphorizedGemStoneRepository.class.st b/source/Sagan-GemStone-Tests/SemaphorizedGemStoneRepository.class.st index 4da19d7..f4b9de9 100644 --- a/source/Sagan-GemStone-Tests/SemaphorizedGemStoneRepository.class.st +++ b/source/Sagan-GemStone-Tests/SemaphorizedGemStoneRepository.class.st @@ -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 [