Consolidated error message
This commit is contained in:
parent
d479e91add
commit
208345c39d
1 changed files with 2 additions and 4 deletions
|
|
@ -209,10 +209,8 @@ public class TestConsumer {
|
||||||
private void validateRecordProcessor() throws Exception {
|
private void validateRecordProcessor() throws Exception {
|
||||||
log.info("The number of expected records is: {}", successfulPutRecords);
|
log.info("The number of expected records is: {}", successfulPutRecords);
|
||||||
final RecordValidationStatus errorVal = consumerConfig.getRecordValidator().validateRecords(successfulPutRecords);
|
final RecordValidationStatus errorVal = consumerConfig.getRecordValidator().validateRecords(successfulPutRecords);
|
||||||
if (errorVal == RecordValidationStatus.OUT_OF_ORDER) {
|
if (errorVal != RecordValidationStatus.NO_ERROR) {
|
||||||
throw new RuntimeException("There was an error validating the records that were processed. The records were out of order");
|
throw new RuntimeException("There was an error validating the records that were processed: " + errorVal.toString());
|
||||||
} else if (errorVal == RecordValidationStatus.MISSING_RECORD) {
|
|
||||||
throw new RuntimeException("There was an error validating the records that were processed. Some records were missing.");
|
|
||||||
}
|
}
|
||||||
log.info("--------------Completed validation of processed records.--------------");
|
log.info("--------------Completed validation of processed records.--------------");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue