Skip to content

Commit ee687b5

Browse files
committed
B2B-2530: Unskip GraphQL cache tests skipped due to DEVOPS-4924
- Adding print_r for debugging3
1 parent b887eeb commit ee687b5

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/PageCache/CacheTagTest.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,14 @@ public function testCacheTagForCategoriesWithProduct()
9595

9696
// cache-debug header value should be a MISS when category is loaded first time
9797
$responseMissOnCategoryQuery = $this->graphQlQueryWithResponseHeaders($categoryQuery, $categoryQueryVariables);
98-
print_r("Value of Category Query");
99-
print_r("=======");
100-
print_r($responseMissOnCategoryQuery);
101-
print_r(" end =======");
98+
print_r("Debug value Miss CacheTest testCacheIsUsedOnSecondRequest\n");
99+
$json_response = json_encode($responseMissOnCategoryQuery, JSON_PRETTY_PRINT);
100+
print_r($json_response);
101+
print_r("\n end \n");
102+
print_r("Debug value End Miss of testCacheIsUsedOnSecondRequest\n");
102103
$cacheId = $responseMissOnCategoryQuery['headers'][CacheIdCalculator::CACHE_ID_HEADER];
104+
print_r("\n CacheId start \n");
105+
print_r($cacheId ."\n");
103106
// Verify we obtain a cache MISS the first time we search the cache using this X-Magento-Cache-Id
104107
$this->assertCacheMissAndReturnResponse($categoryQuery, [CacheIdCalculator::CACHE_ID_HEADER => $cacheId]);
105108

@@ -122,9 +125,17 @@ public function testCacheTagForCategoriesWithProduct()
122125
);
123126
$this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseMissCategoryAfterUpdate['headers']);
124127
$cacheId = $responseMissCategoryAfterUpdate['headers'][CacheIdCalculator::CACHE_ID_HEADER];
128+
print_r("Debug value Miss CacheTest testCacheIsUsedOnSecondRequest\n");
129+
$json_response = json_encode($responseMissOnCategoryQuery, JSON_PRETTY_PRINT);
130+
print_r($json_response);
131+
print_r("\n end \n");
132+
print_r("Debug value End Miss of testCacheIsUsedOnSecondRequest\n");
133+
print_r("\n CacheId 2 start \n");
134+
print_r($cacheId ."\n");
135+
125136
// Verify we obtain a cache MISS the first time we search the cache using this X-Magento-Cache-Id
126137
$this->assertCacheMissAndReturnResponse($categoryQuery, [$categoryQueryVariables, CacheIdCalculator::CACHE_ID_HEADER => $cacheId]);
127-
138+
128139
// cache-debug should be a MISS for product 1 after it is updated - cache invalidation
129140
$responseMissFirstProductAfterUpdate = $this->graphQlQueryWithResponseHeaders($product1Query);
130141
$cacheId = $responseMissFirstProductAfterUpdate['headers'][CacheIdCalculator::CACHE_ID_HEADER];

0 commit comments

Comments
 (0)