From 10df2ced56f7010cf274c7950d9d30a7c8db2ba3 Mon Sep 17 00:00:00 2001
From: Luke Rodgers <lukerodgers90@gmail.com>
Date: Mon, 4 Dec 2017 19:08:45 +0000
Subject: [PATCH] Replace getListSize with getList

This is not so performant, but as discussed in github it'll do for now.
---
 .../Indexer/Console/Command/IndexerStatusCommand.php        | 2 +-
 .../Test/Unit/Console/Command/IndexerStatusCommandTest.php  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/Indexer/Console/Command/IndexerStatusCommand.php b/app/code/Magento/Indexer/Console/Command/IndexerStatusCommand.php
index f5237ea5d02..22acdc6f82b 100644
--- a/app/code/Magento/Indexer/Console/Command/IndexerStatusCommand.php
+++ b/app/code/Magento/Indexer/Console/Command/IndexerStatusCommand.php
@@ -103,7 +103,7 @@ class IndexerStatusCommand extends AbstractIndexerManageCommand
 
         $state = $view->getState();
 
-        $pendingCount = $changelog->getListSize($state->getVersionId(), $currentVersionId);
+        $pendingCount = count($changelog->getList($state->getVersionId(), $currentVersionId));
 
         $pendingString = "<error>$pendingCount</error>";
         if ($pendingCount <= 0) {
diff --git a/app/code/Magento/Indexer/Test/Unit/Console/Command/IndexerStatusCommandTest.php b/app/code/Magento/Indexer/Test/Unit/Console/Command/IndexerStatusCommandTest.php
index 45b3ec3471b..31513da018c 100644
--- a/app/code/Magento/Indexer/Test/Unit/Console/Command/IndexerStatusCommandTest.php
+++ b/app/code/Magento/Indexer/Test/Unit/Console/Command/IndexerStatusCommandTest.php
@@ -27,14 +27,14 @@ class IndexerStatusCommandTest extends AbstractIndexerCommandCommonSetup
      */
     private function attachViewToIndexerMock($indexerMock, array $data)
     {
-         /** @var \Magento\Framework\Mview\View\Changelog|\PHPUnit_Framework_MockObject_MockObject $stub */
+         /** @var \Magento\Framework\Mview\View\Changelog|\PHPUnit_Framework_MockObject_MockObject $changelog */
         $changelog = $this->getMockBuilder(\Magento\Framework\Mview\View\Changelog::class)
             ->disableOriginalConstructor()
             ->getMock();
 
         $changelog->expects($this->any())
-            ->method('getListSize')
-            ->willReturn($data['view']['changelog']['list_size']);
+            ->method('getList')
+            ->willReturn(range(0, $data['view']['changelog']['list_size']-1));
 
         /** @var \Magento\Indexer\Model\Mview\View\State|\PHPUnit_Framework_MockObject_MockObject $stateMock */
         $stateMock = $this->getMockBuilder(\Magento\Indexer\Model\Mview\View\State::class)
-- 
GitLab