@@ -112,7 +112,7 @@ public function testGetVersion()
112112 */
113113 public function testChangelogClearOversizeBatchSize ()
114114 {
115- $ stateVersionId = 10100 ;
115+ $ stateVersionId = 14001 ;
116116 $ changelog = $ this ->generateChangelog (20000 );
117117
118118 // #0: check if changelog generated correctly
@@ -121,18 +121,12 @@ public function testChangelogClearOversizeBatchSize()
121121
122122 // #1: check if changelog reduced by batch size value
123123 $ this ->model ->clear ($ stateVersionId );
124- $ this ->assertEquals (10001 , $ this ->getChangelogFirstEntityId ($ changelog ));
125- $ this ->assertEquals (10000 , $ this ->getChangelogEntitiesCount ($ changelog ));
124+ $ this ->assertEquals ($ stateVersionId , $ this ->getChangelogFirstEntityId ($ changelog ));
125+ $ this ->assertEquals (6000 , $ this ->getChangelogEntitiesCount ($ changelog ));
126126
127- // #2: check if changelog reduced to the mview state version id
128- $ this ->model ->clear ($ stateVersionId );
129- $ this ->assertEquals (10100 , $ this ->getChangelogFirstEntityId ($ changelog ));
130- $ this ->assertEquals (9901 , $ this ->getChangelogEntitiesCount ($ changelog ));
131-
132- // #3: check if changelog stays the same size and values on the next iteration
133- $ this ->model ->clear ($ stateVersionId );
134- $ this ->assertEquals (10100 , $ this ->getChangelogFirstEntityId ($ changelog ));
135- $ this ->assertEquals (9901 , $ this ->getChangelogEntitiesCount ($ changelog ));
127+ // #2: fully clear changelog
128+ $ this ->model ->clear (20001 );
129+ $ this ->assertEquals (0 , $ this ->getChangelogEntitiesCount ($ changelog ));
136130 }
137131
138132 /**
0 commit comments