@@ -112,7 +112,7 @@ public function testGetVersion()
112
112
*/
113
113
public function testChangelogClearOversizeBatchSize ()
114
114
{
115
- $ stateVersionId = 10100 ;
115
+ $ stateVersionId = 14001 ;
116
116
$ changelog = $ this ->generateChangelog (20000 );
117
117
118
118
// #0: check if changelog generated correctly
@@ -121,18 +121,12 @@ public function testChangelogClearOversizeBatchSize()
121
121
122
122
// #1: check if changelog reduced by batch size value
123
123
$ 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 ));
126
126
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 ));
136
130
}
137
131
138
132
/**
0 commit comments