Skip to content

[GraphQL] Wrong tags are set for CategoryList query #29372

Closed
@magento-engcom-team

Description

@magento-engcom-team

We have an integration test that verifies pretty strange behavior: "category tag is present in X-Magento-Tags for current Query if it was present in the previous query"

Steps to reproduce

  1. Run only 1 test-case "testRequestCacheTagsForCategoryListOnMultipleIds":
    Magento\GraphQlCache\Controller\Catalog\CategoryListCacheTest::testRequestCacheTagsForCategoryListOnMultipleIds
Magento\GraphQlCache\Controller\Catalog\CategoryListCacheTest::testRequestCacheTagsForCategoryListOnMultipleIds
Failed asserting that two arrays are equal.
--- Expected
<ins></ins><ins> Actual
@@ @@
 Array (
     0 => ‘cat_c’
-    1 => ‘cat*c*333’
-    2 => ‘cat*c*400’
-    3 => ‘cat*c*401’
-    4 => ‘FPC’
</ins>    1 => ‘cat*c*400’
<ins>    2 => ‘cat*c*401’
</ins>    3 => ‘FPC’
 )
/magento/dev/tests/integration/testsuite/Magento/GraphQlCache/Controller/Catalog/CategoryListCacheTest.php:108
FAILURES!
Tests: 1, Assertions: 2, Failures: 1.
{code}

2. Run all tests-cases Magento\GraphQlCache\Controller\Catalog\CategoryListCacheTest:
{code}
testsuite/Magento/GraphQlCache/Controller/Catalog/CategoryListCacheTest.php
PHPUnit 9.1.5 by Sebastian Bergmann and contributors.
Warning:       Using a custom test suite loader is deprecated
....                                                                                                                           4 / 4 (100%)
Time: 01:02.900, Memory: 98.00 MB
OK (4 tests, 12 assertions)

Expected behaviour: tag "333" form First request should not be "remembered" from one request to another and present in response for Second request

Note:

  • possible this is issue in integration framework, so need to check this behavior without tests
  • possible this issue is present in Luma as well (not only for GQL) and it should be escalated with their priority

Metadata

Metadata

Assignees

Labels

Issue: Format is not validGate 1 Failed. Automatic verification of issue format is failedPAPPartners acceleration programPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneProject: GraphQLReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S1Affects critical data or functionality and forces users to employ a workaround.

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions