@ -107,7 +107,7 @@ public class StoreChangelogReaderTest {
@@ -107,7 +107,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
changelogReader . restore ( active ) ;
assertTrue ( functionCalled . get ( ) ) ;
}
@ -145,7 +145,7 @@ public class StoreChangelogReaderTest {
@@ -145,7 +145,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andStubReturn ( task ) ;
replay ( active , task ) ;
changelogReader . restore ( active ) ;
@ -170,7 +170,7 @@ public class StoreChangelogReaderTest {
@@ -170,7 +170,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
EasyMock . expect ( active . restoringTaskFor ( topicPartition ) ) . andStubReturn ( task ) ;
EasyMock . replay ( active , task ) ;
@ -185,7 +185,7 @@ public class StoreChangelogReaderTest {
@@ -185,7 +185,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
// retry restore should succeed
assertEquals ( 1 , changelogReader . restore ( active ) . size ( ) ) ;
assertThat ( callback . restored . size ( ) , equalTo ( messages ) ) ;
@ -210,7 +210,7 @@ public class StoreChangelogReaderTest {
@@ -210,7 +210,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ;
record - > record ) ;
changelogReader . register ( stateRestorer ) ;
EasyMock . expect ( active . restoringTaskFor ( topicPartition ) ) . andStubReturn ( task ) ;
@ -240,7 +240,7 @@ public class StoreChangelogReaderTest {
@@ -240,7 +240,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
changelogReader . restore ( active ) ;
assertThat ( callback . restored . size ( ) , equalTo ( 5 ) ) ;
@ -257,7 +257,7 @@ public class StoreChangelogReaderTest {
@@ -257,7 +257,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andStubReturn ( task ) ;
replay ( active , task ) ;
changelogReader . restore ( active ) ;
@ -274,7 +274,7 @@ public class StoreChangelogReaderTest {
@@ -274,7 +274,7 @@ public class StoreChangelogReaderTest {
3 ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ;
record - > record ) ;
changelogReader . register ( restorer ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andStubReturn ( task ) ;
replay ( active , task ) ;
@ -302,7 +302,7 @@ public class StoreChangelogReaderTest {
@@ -302,7 +302,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName1" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
changelogReader . register ( new StateRestorer (
one ,
restoreListener1 ,
@ -310,7 +310,7 @@ public class StoreChangelogReaderTest {
@@ -310,7 +310,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName2" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
changelogReader . register ( new StateRestorer (
two ,
restoreListener2 ,
@ -318,7 +318,7 @@ public class StoreChangelogReaderTest {
@@ -318,7 +318,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName3" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( one ) ) . andStubReturn ( task ) ;
expect ( active . restoringTaskFor ( two ) ) . andStubReturn ( task ) ;
@ -350,7 +350,7 @@ public class StoreChangelogReaderTest {
@@ -350,7 +350,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName1" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
changelogReader . register ( new StateRestorer (
one ,
restoreListener1 ,
@ -358,7 +358,7 @@ public class StoreChangelogReaderTest {
@@ -358,7 +358,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName2" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
changelogReader . register ( new StateRestorer (
two ,
restoreListener2 ,
@ -366,7 +366,7 @@ public class StoreChangelogReaderTest {
@@ -366,7 +366,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName3" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( one ) ) . andReturn ( task ) ;
expect ( active . restoringTaskFor ( two ) ) . andReturn ( task ) ;
@ -401,7 +401,7 @@ public class StoreChangelogReaderTest {
@@ -401,7 +401,7 @@ public class StoreChangelogReaderTest {
5 ,
true ,
"storeName1" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andStubReturn ( task ) ;
replay ( active , task ) ;
changelogReader . restore ( active ) ;
@ -437,7 +437,7 @@ public class StoreChangelogReaderTest {
@@ -437,7 +437,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ;
record - > record ) ;
setupConsumer ( 0 , topicPartition ) ;
changelogReader . register ( restorer ) ;
@ -457,7 +457,7 @@ public class StoreChangelogReaderTest {
@@ -457,7 +457,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ;
record - > record ) ;
changelogReader . register ( restorer ) ;
@ -476,7 +476,7 @@ public class StoreChangelogReaderTest {
@@ -476,7 +476,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andStubReturn ( task ) ;
replay ( active , task ) ;
changelogReader . restore ( active ) ;
@ -495,7 +495,7 @@ public class StoreChangelogReaderTest {
@@ -495,7 +495,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
false ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andStubReturn ( task ) ;
replay ( active , task ) ;
changelogReader . restore ( active ) ;
@ -518,7 +518,7 @@ public class StoreChangelogReaderTest {
@@ -518,7 +518,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
false ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andStubReturn ( task ) ;
replay ( active , task ) ;
changelogReader . restore ( active ) ;
@ -537,7 +537,7 @@ public class StoreChangelogReaderTest {
@@ -537,7 +537,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"store" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andStubReturn ( task ) ;
replay ( active , task ) ;
@ -559,7 +559,7 @@ public class StoreChangelogReaderTest {
@@ -559,7 +559,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
false ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
final TopicPartition postInitialization = new TopicPartition ( "other" , 0 ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andStubReturn ( task ) ;
@ -581,7 +581,7 @@ public class StoreChangelogReaderTest {
@@ -581,7 +581,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
false ,
"otherStore" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
final Collection < TopicPartition > expected = Utils . mkSet ( topicPartition , postInitialization ) ;
consumer . assign ( expected ) ;
@ -605,7 +605,7 @@ public class StoreChangelogReaderTest {
@@ -605,7 +605,7 @@ public class StoreChangelogReaderTest {
9L ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andReturn ( task ) ;
replay ( active ) ;
@ -627,7 +627,7 @@ public class StoreChangelogReaderTest {
@@ -627,7 +627,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andReturn ( task ) ;
replay ( active ) ;
@ -648,7 +648,7 @@ public class StoreChangelogReaderTest {
@@ -648,7 +648,7 @@ public class StoreChangelogReaderTest {
Long . MAX_VALUE ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andReturn ( task ) ;
replay ( active ) ;
@ -668,7 +668,7 @@ public class StoreChangelogReaderTest {
@@ -668,7 +668,7 @@ public class StoreChangelogReaderTest {
5 ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andReturn ( task ) ;
replay ( active ) ;
@ -689,7 +689,7 @@ public class StoreChangelogReaderTest {
@@ -689,7 +689,7 @@ public class StoreChangelogReaderTest {
10 ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andReturn ( task ) ;
replay ( active ) ;
@ -717,7 +717,7 @@ public class StoreChangelogReaderTest {
@@ -717,7 +717,7 @@ public class StoreChangelogReaderTest {
6 ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andReturn ( task ) ;
replay ( active ) ;
@ -740,7 +740,7 @@ public class StoreChangelogReaderTest {
@@ -740,7 +740,7 @@ public class StoreChangelogReaderTest {
11 ,
true ,
"storeName" ,
new DefaultRecordConverter ( ) ) ) ;
record - > record ) ) ;
expect ( active . restoringTaskFor ( topicPartition ) ) . andReturn ( task ) ;
replay ( active ) ;