From d9dd253fa3535fa788e86cad99c460a7ee424587 Mon Sep 17 00:00:00 2001
From: Andrii Kasian <akasian@magento.com>
Date: Mon, 10 Oct 2016 21:32:48 +0300
Subject: [PATCH] MAGETWO-55299: [Customer] Fast Save of Product Variations

     - MAGETWO-55787: Fast saving of product with high number of variations generated
---
 .../Magento/TestFramework/Annotation/ApiDataFixture.php       | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiDataFixture.php b/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiDataFixture.php
index 5eeb7ddb61f..0ad53eeeb90 100644
--- a/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiDataFixture.php
+++ b/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiDataFixture.php
@@ -51,6 +51,7 @@ class ApiDataFixture
      */
     public function startTest(\PHPUnit_Framework_TestCase $test)
     {
+        \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize();
         /** Apply method level fixtures if thy are available, apply class level fixtures otherwise */
         $this->_applyFixtures($this->_getFixtures('method', $test) ?: $this->_getFixtures('class', $test));
     }
@@ -61,6 +62,9 @@ class ApiDataFixture
     public function endTest()
     {
         $this->_revertFixtures();
+        /** @var $objectManager \Magento\TestFramework\ObjectManager */
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $objectManager->get(\Magento\Eav\Model\Entity\AttributeCache::class)->clear();
     }
 
     /**
-- 
GitLab