@@ -72,9 +72,6 @@ final class UnifiedTestRunner
72
72
/** @var EntityMap */
73
73
private $ entityMap ;
74
74
75
- /** @var callable(EntityMap):void */
76
- private $ entityMapObserver ;
77
-
78
75
/** @var FailPointObserver */
79
76
private $ failPointObserver ;
80
77
@@ -113,31 +110,10 @@ public function run(UnifiedTestCase $test): void
113
110
114
111
throw $ e ;
115
112
} finally {
116
- /* An EntityMap observer should be invoked irrespective of the test
117
- * succeeding or failing. Since the callable itself might throw, we
118
- * need to ensure doTearDown() will still be called. */
119
- try {
120
- if (isset ($ this ->entityMapObserver , $ this ->entityMap )) {
121
- call_user_func ($ this ->entityMapObserver , $ this ->entityMap );
122
- }
123
- } finally {
124
- $ this ->doTearDown ($ hasFailed );
125
- }
113
+ $ this ->doTearDown ($ hasFailed );
126
114
}
127
115
}
128
116
129
- /**
130
- * Defines a callable to receive the EntityMap after each test.
131
- *
132
- * This function is primarily used by the Atlas testing workload executor.
133
- *
134
- * @param callable(EntityMap):void $entityMapObserver
135
- */
136
- public function setEntityMapObserver (callable $ entityMapObserver ): void
137
- {
138
- $ this ->entityMapObserver = $ entityMapObserver ;
139
- }
140
-
141
117
private function doSetUp (): void
142
118
{
143
119
/* The transactions spec advises calling killAllSessions only at the
@@ -193,13 +169,6 @@ private function doTestCase(stdClass $test, string $schemaVersion, ?array $runOn
193
169
194
170
$ context = $ this ->createContext ();
195
171
196
- /* If an EntityMap observer has been configured, assign the Context's
197
- * EntityMap to a class property so it can later be accessed from run(),
198
- * irrespective of whether this test succeeds or fails. */
199
- if (isset ($ this ->entityMapObserver )) {
200
- $ this ->entityMap = $ context ->getEntityMap ();
201
- }
202
-
203
172
if (isset ($ createEntities )) {
204
173
$ context ->createEntities ($ createEntities );
205
174
}
0 commit comments