diff --git a/tests/UnifiedSpecTests/UnifiedTestRunner.php b/tests/UnifiedSpecTests/UnifiedTestRunner.php index 40f2c3046..94d318120 100644 --- a/tests/UnifiedSpecTests/UnifiedTestRunner.php +++ b/tests/UnifiedSpecTests/UnifiedTestRunner.php @@ -72,9 +72,6 @@ final class UnifiedTestRunner /** @var EntityMap */ private $entityMap; - /** @var callable(EntityMap):void */ - private $entityMapObserver; - /** @var FailPointObserver */ private $failPointObserver; @@ -113,31 +110,10 @@ public function run(UnifiedTestCase $test): void throw $e; } finally { - /* An EntityMap observer should be invoked irrespective of the test - * succeeding or failing. Since the callable itself might throw, we - * need to ensure doTearDown() will still be called. */ - try { - if (isset($this->entityMapObserver, $this->entityMap)) { - call_user_func($this->entityMapObserver, $this->entityMap); - } - } finally { - $this->doTearDown($hasFailed); - } + $this->doTearDown($hasFailed); } } - /** - * Defines a callable to receive the EntityMap after each test. - * - * This function is primarily used by the Atlas testing workload executor. - * - * @param callable(EntityMap):void $entityMapObserver - */ - public function setEntityMapObserver(callable $entityMapObserver): void - { - $this->entityMapObserver = $entityMapObserver; - } - private function doSetUp(): void { /* The transactions spec advises calling killAllSessions only at the @@ -193,13 +169,6 @@ private function doTestCase(stdClass $test, string $schemaVersion, ?array $runOn $context = $this->createContext(); - /* If an EntityMap observer has been configured, assign the Context's - * EntityMap to a class property so it can later be accessed from run(), - * irrespective of whether this test succeeds or fails. */ - if (isset($this->entityMapObserver)) { - $this->entityMap = $context->getEntityMap(); - } - if (isset($createEntities)) { $context->createEntities($createEntities); }