|
4 | 4 |
|
5 | 5 | namespace Tests\Unit\V2; |
6 | 6 |
|
7 | | -use Illuminate\Cache\CacheManager; |
8 | | -use Illuminate\Cache\Repository; |
9 | 7 | use Illuminate\Support\Carbon; |
10 | | -use Tests\Support\NonLockingCacheStore; |
11 | 8 | use Tests\TestCase; |
12 | 9 | use Workflow\V2\Support\BackendCapabilities; |
13 | 10 |
|
@@ -96,17 +93,11 @@ public function testSnapshotIncludesFrozenReadinessContractMatrix(): void |
96 | 93 | 'info', |
97 | 94 | $contract['backend_capabilities']['queue']['poll_mode']['sync_or_missing_queue_severity'] |
98 | 95 | ); |
99 | | - $this->assertSame('warning', $contract['backend_capabilities']['cache']['dispatch_blocking_severity']); |
100 | | - $this->assertSame('acceleration_only', $contract['backend_capabilities']['cache']['role']); |
101 | 96 | $this->assertSame('avro', $contract['backend_capabilities']['codec']['default_for_new_v2_runs']); |
102 | 97 | $this->assertSame( |
103 | 98 | 'evaluated_by_backend_capabilities_snapshot', |
104 | 99 | $contract['effective_states']['dispatch']['state'] |
105 | 100 | ); |
106 | | - $this->assertStringContainsString( |
107 | | - 'cache diagnostics stay warning-only', |
108 | | - $contract['effective_states']['dispatch']['blocking_rule'] |
109 | | - ); |
110 | 101 | } |
111 | 102 |
|
112 | 103 | public function testSnapshotCanInspectAnExplicitTaskQueueConnection(): void |
@@ -381,8 +372,6 @@ public function testSnapshotIncludesSeverityRollupOfOkWhenAdmissionIsClean(): vo |
381 | 372 | ->set('cache.default', 'array'); |
382 | 373 | config() |
383 | 374 | ->set('cache.stores.array.driver', 'array'); |
384 | | - config() |
385 | | - ->set('workflows.serializer', 'avro'); |
386 | 375 |
|
387 | 376 | $snapshot = BackendCapabilities::snapshot(); |
388 | 377 |
|
@@ -450,49 +439,4 @@ public function testSnapshotSeverityRollupReportsErrorWhenAnyIssueIsErrorSeverit |
450 | 439 | $this->assertSame('error', $snapshot['severity']); |
451 | 440 | $this->assertFalse($snapshot['supported']); |
452 | 441 | } |
453 | | - |
454 | | - public function testCustomNoLockCacheStoreIsWarningOnlyAndDoesNotFailSupport(): void |
455 | | - { |
456 | | - config()->set('database.default', 'pgsql'); |
457 | | - config() |
458 | | - ->set('database.connections.pgsql.driver', 'pgsql'); |
459 | | - config() |
460 | | - ->set('queue.default', 'redis'); |
461 | | - config() |
462 | | - ->set('queue.connections.redis.driver', 'redis'); |
463 | | - config() |
464 | | - ->set('workflows.serializer', 'avro'); |
465 | | - $this->configureNonLockingCacheStore(); |
466 | | - |
467 | | - $snapshot = BackendCapabilities::snapshot(); |
468 | | - |
469 | | - $this->assertTrue($snapshot['supported']); |
470 | | - $this->assertTrue(BackendCapabilities::isSupported($snapshot)); |
471 | | - $this->assertTrue($snapshot['cache']['supported']); |
472 | | - $this->assertSame('warning', $snapshot['severity']); |
473 | | - |
474 | | - $cacheIssue = collect($snapshot['issues'])->firstWhere('code', 'cache_locks_unsupported'); |
475 | | - $this->assertNotNull($cacheIssue); |
476 | | - $this->assertSame('warning', $cacheIssue['severity']); |
477 | | - $this->assertStringContainsString('Wake acceleration remains optional', $cacheIssue['message']); |
478 | | - } |
479 | | - |
480 | | - private function configureNonLockingCacheStore(): void |
481 | | - { |
482 | | - $driver = 'test-non-locking'; |
483 | | - $store = 'test-non-locking'; |
484 | | - |
485 | | - $this->app['cache']->extend($driver, function (): Repository { |
486 | | - if (! $this instanceof CacheManager) { |
487 | | - throw new \RuntimeException('Unexpected cache manager binding.'); |
488 | | - } |
489 | | - |
490 | | - return new Repository(new NonLockingCacheStore()); |
491 | | - }); |
492 | | - |
493 | | - config() |
494 | | - ->set("cache.stores.{$store}.driver", $driver); |
495 | | - config() |
496 | | - ->set('cache.default', $store); |
497 | | - } |
498 | 442 | } |
0 commit comments