diff -u b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php --- b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php @@ -146,18 +146,17 @@ // All source plugins must define IDs. $this->assertNotEmpty($plugin->getIds()); - if (is_null($expected_count)) { - $expected_count = count($expected_data); - } - // If there is a high water mark, set it in the high water storage. if (isset($high_water)) { $this->container ->get('keyvalue') ->get('migrate:high_water') - ->set($this->migration->id(), $high_water); + ->set($this->migration->reveal()->id(), $high_water); } + if (is_null($expected_count)) { + $expected_count = count($expected_data); + } // If an expected count was given, assert it only if the plugin is // countable. if (is_numeric($expected_count)) { only in patch2: unchanged: --- a/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php +++ b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php @@ -216,6 +216,7 @@ protected function initializeIterator() { $high_water_field = $this->getHighWaterField(); $conditions->condition($high_water_field, $high_water, '>'); $this->query->orderBy($high_water_field); + $condition_added = TRUE; } if ($condition_added) { $this->query->condition($conditions);