@@ -62,34 +62,6 @@ GemStoneRepositoryProviderTest >> testExceptionsAbortTransactionsUntilHandled [
62
62
self assertTheOnlyOneInTheRepositoryIsSilvesterStallone
63
63
]
64
64
65
- { #category : ' tests - conflict checking' }
66
- GemStoneRepositoryProviderTest >> testPurgeInSimultaneous [
67
-
68
- | semaphore previous |
69
-
70
- previous := System transactionMode.
71
- [
72
- System transactionMode: #manualBegin .
73
- semaphore := Semaphore new .
74
- self
75
- setUpRepositoryProvidedBy: ( SemaphorizedGemStoneRepositoryProvider waitingOn: semaphore )
76
- with:
77
- ( CriteriaBasedConflictCheckingStrategy forSingleAspectMatching: [ :person | person firstName ] ).
78
- [ self extraterrestrials store: self silvesterStallone ] fork.
79
- Processor yield.
80
- semaphore signal .
81
- [ self extraterrestrials purge: self silvesterStallone ] fork.
82
- Processor yield.
83
- [ self should: [ self extraterrestrials purge: self silvesterStallone ] raise: ObjectNotFound ]
84
- fork.
85
- Processor yield.
86
- semaphore signal .
87
- semaphore signal .
88
- Processor yield.
89
- self assert: self extraterrestrials findAll isEmpty
90
- ] ensure : [ System transactionMode: previous ]
91
- ]
92
-
93
65
{ #category : ' tests' }
94
66
GemStoneRepositoryProviderTest >> testQueryReturningBeforeAllIndexedResultsAreRead [
95
67
@@ -455,39 +427,6 @@ GemStoneRepositoryProviderTest >> testSpaceshipWhenUsingIdentityIndex [
455
427
]
456
428
]
457
429
458
- { #category : ' tests - conflict checking' }
459
- GemStoneRepositoryProviderTest >> testStoreInSimultaneous [
460
-
461
- | semaphore previous |
462
-
463
- previous := System transactionMode.
464
- [
465
- System transactionMode: #manualBegin .
466
- semaphore := Semaphore new .
467
- self
468
- setUpRepositoryProvidedBy: ( SemaphorizedGemStoneRepositoryProvider waitingOn: semaphore )
469
- with:
470
- ( CriteriaBasedConflictCheckingStrategy forSingleAspectMatching: [ :person | person firstName ] ).
471
- [ self extraterrestrials store: self silvesterStallone ] fork.
472
- Processor yield.
473
- [
474
- self
475
- should: [ self extraterrestrials store: self silvesterStallone ]
476
- raise: ConflictingObjectFound
477
- withMessageText: ' Something is in conflict with Stallone, Silvester'
478
- ] fork.
479
- Processor yield.
480
- semaphore signal .
481
- semaphore signal .
482
- Processor yield.
483
- self withTheOnlyOneIn: self extraterrestrials findAll do: [ :extraterrestrial |
484
- self
485
- assert: extraterrestrial firstName equals: ' Silvester' ;
486
- assert: extraterrestrial lastName equals: ' Stallone'
487
- ]
488
- ] ensure : [ System transactionMode: previous ]
489
- ]
490
-
491
430
{ #category : ' tests' }
492
431
GemStoneRepositoryProviderTest >> testStreamQueryResults [
493
432
0 commit comments