@@ -147,9 +147,9 @@ void testFetchWithSchemaChange() throws Exception {
147147 assertThat (logFetcher .hasAvailableFetches ()).isTrue ();
148148 assertThat (logFetcher .getCompletedFetchesSize ()).isEqualTo (2 );
149149 });
150- Map < TableBucket , List < ScanRecord >> records = logFetcher .collectFetch ();
151- assertThat (records .size ()).isEqualTo (1 );
152- List <ScanRecord > scanRecords = records .get (tb0 );
150+ ScanRecords records = logFetcher .collectFetch ();
151+ assertThat (records .buckets (). size ()).isEqualTo (1 );
152+ List <ScanRecord > scanRecords = records .records (tb0 );
153153 assertThat (scanRecords .stream ().map (ScanRecord ::getRow ).collect (Collectors .toList ()))
154154 .isEqualTo (expectedRows );
155155
@@ -193,9 +193,9 @@ void testFetchWithSchemaChange() throws Exception {
193193 assertThat (newSchemaLogFetcher .getCompletedFetchesSize ()).isEqualTo (2 );
194194 });
195195 records = newSchemaLogFetcher .collectFetch ();
196- assertThat (records .size ()).isEqualTo (1 );
197- assertThat (records .get (tb0 )).hasSize (20 );
198- scanRecords = records .get (tb0 );
196+ assertThat (records .buckets (). size ()).isEqualTo (1 );
197+ assertThat (records .records (tb0 )).hasSize (20 );
198+ scanRecords = records .records (tb0 );
199199 assertThat (scanRecords .stream ().map (ScanRecord ::getRow ).collect (Collectors .toList ()))
200200 .isEqualTo (expectedRows );
201201 newSchemaLogFetcher .close ();
@@ -226,10 +226,10 @@ void testFetch() throws Exception {
226226 assertThat (logFetcher .getCompletedFetchesSize ()).isEqualTo (2 );
227227 });
228228
229- Map < TableBucket , List < ScanRecord >> records = logFetcher .collectFetch ();
230- assertThat (records .size ()).isEqualTo (2 );
231- assertThat (records .get (tb0 ).size ()).isEqualTo (10 );
232- assertThat (records .get (tb1 ).size ()).isEqualTo (10 );
229+ ScanRecords records = logFetcher .collectFetch ();
230+ assertThat (records .buckets (). size ()).isEqualTo (2 );
231+ assertThat (records .records (tb0 ).size ()).isEqualTo (10 );
232+ assertThat (records .records (tb1 ).size ()).isEqualTo (10 );
233233
234234 // after collect fetch, the fetcher is empty.
235235 assertThat (logFetcher .hasAvailableFetches ()).isFalse ();
@@ -297,9 +297,9 @@ void testFetchWhenDestinationIsNullInMetadata() throws Exception {
297297 assertThat (logFetcher .hasAvailableFetches ()).isTrue ();
298298 assertThat (logFetcher .getCompletedFetchesSize ()).isEqualTo (1 );
299299 });
300- Map < TableBucket , List < ScanRecord >> records = logFetcher .collectFetch ();
301- assertThat (records .size ()).isEqualTo (1 );
302- assertThat (records .get (tb0 ).size ()).isEqualTo (10 );
300+ ScanRecords records = logFetcher .collectFetch ();
301+ assertThat (records .buckets (). size ()).isEqualTo (1 );
302+ assertThat (records .records (tb0 ).size ()).isEqualTo (10 );
303303 }
304304
305305 @ Test
0 commit comments