Skip to content

Commit 1559f54

Browse files
committed
ACPT-1798: [Application Server] Integration test failures
1 parent 0b62cb0 commit 1559f54

File tree

6 files changed

+13
-30
lines changed

6 files changed

+13
-30
lines changed

dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlCheckoutMutationsStateTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ class GraphQlCheckoutMutationsStateTest extends \PHPUnit\Framework\TestCase
3535
*/
3636
protected function setUp(): void
3737
{
38-
if (version_compare(PHP_VERSION, '8.3', '>=')) {
39-
ini_set("zend.enable_gc",0);
40-
$this->markTestSkipped(
41-
'Test is skip and un-skip again in scope of this - AC-11491 on this version of Magento.'
42-
);
43-
}
4438
if (!class_exists(GraphQlStateDiff::class)) {
4539
$this->markTestSkipped('GraphQlStateDiff class is not available on this version of Magento.');
4640
}

dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlCustomerMutationsTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ class GraphQlCustomerMutationsTest extends \PHPUnit\Framework\TestCase
3232
*/
3333
protected function setUp(): void
3434
{
35-
if (version_compare(PHP_VERSION, '8.3', '>=')) {
36-
ini_set("zend.enable_gc",0);
37-
$this->markTestSkipped(
38-
'Test is skip and un-skip again in scope of this - AC-11491 on this version of Magento.'
39-
);
40-
}
4135
if (!class_exists(GraphQlStateDiff::class)) {
4236
$this->markTestSkipped('GraphQlStateDiff class is not available on this version of Magento.');
4337
}

dev/tests/integration/testsuite/Magento/GraphQl/App/GraphQlStateTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ class GraphQlStateTest extends \PHPUnit\Framework\TestCase
3535
*/
3636
protected function setUp(): void
3737
{
38-
if (version_compare(PHP_VERSION, '8.3', '>=')) {
39-
ini_set("zend.enable_gc",0);
40-
$this->markTestSkipped(
41-
'Test is skip and un-skip again in scope of this - AC-11491 on this version of Magento.'
42-
);
43-
}
4438
if (!class_exists(GraphQlStateDiff::class)) {
4539
$this->markTestSkipped('GraphQlStateDiff class is not available on this version of Magento.');
4640
}

dev/tests/integration/testsuite/Magento/GraphQl/App/State/GraphQlStateDiff.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ public function testState(
116116
string $expected,
117117
TestCase $test
118118
): void {
119+
if (8 == PHP_MAJOR_VERSION && PHP_MINOR_VERSION < 4) {
120+
$test->markTestSkipped(
121+
"This test isn't compatible with PHP 8.3 versions less than PHP 8.3.4 because of "
122+
. "bug in garbage collector. https://github.com/php/php-src/issues/13569"
123+
. " will roll back in AC-11491"
124+
);
125+
}
119126
if (array_key_exists(1, $authInfo)) {
120127
$authInfo1 = $authInfo[0];
121128
$authInfo2 = $authInfo[1];

dev/tests/integration/testsuite/Magento/GraphQl/Controller/GraphQlControllerTest.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
class GraphQlControllerTest extends \Magento\TestFramework\Indexer\TestCase
2626
{
27-
public const CONTENT_TYPE = 'application/json';
27+
const CONTENT_TYPE = 'application/json';
2828

2929
/** @var \Magento\Framework\ObjectManagerInterface */
3030
private $objectManager;
@@ -56,12 +56,6 @@ public static function setUpBeforeClass(): void
5656

5757
protected function setUp(): void
5858
{
59-
if (version_compare(PHP_VERSION, '8.3', '>=')) {
60-
ini_set("zend.enable_gc",0);
61-
$this->markTestSkipped(
62-
'Test is skip and un-skip again in scope of this - AC-11491 on this version of Magento.'
63-
);
64-
}
6559
$this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
6660
$this->graphql = $this->objectManager->get(\Magento\GraphQl\Controller\GraphQl::class);
6761
$this->jsonSerializer = $this->objectManager->get(SerializerInterface::class);
@@ -181,7 +175,7 @@ public function testDispatchGetWithParameterizedVariables() : void
181175
id
182176
name
183177
sku
184-
}
178+
}
185179
}
186180
}
187181
QUERY;
@@ -229,12 +223,12 @@ public function testError() : void
229223
}
230224
])
231225
{
232-
items{
226+
items{
233227
attribute_code
234228
attribute_type
235229
entity_type
236-
}
237-
}
230+
}
231+
}
238232
}
239233
QUERY;
240234

lib/internal/Magento/Framework/ObjectManager/Resetter/Resetter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function _resetState(): void
8787
{
8888
/* Note: We force garbage collection to clean up cyclic referenced objects before _resetState()
8989
* This is to prevent calling _resetState() on objects that will be destroyed by garbage collector. */
90-
//gc_collect_cycles();
90+
gc_collect_cycles();
9191
if (!$this->weakMapSorter) {
9292
$this->weakMapSorter = $this->objectManager->get(WeakMapSorter::class);
9393
}

0 commit comments

Comments
 (0)