projects
/
demos
/
kafka
/
training
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Verbesserte Tests und Korrekturen gemerged: sumup-adder -> stored-offsets
[demos/kafka/training]
/
src
/
test
/
java
/
de
/
juplo
/
kafka
/
ApplicationTests.java
diff --git
a/src/test/java/de/juplo/kafka/ApplicationTests.java
b/src/test/java/de/juplo/kafka/ApplicationTests.java
index
8369a7b
..
5166227
100644
(file)
--- a/
src/test/java/de/juplo/kafka/ApplicationTests.java
+++ b/
src/test/java/de/juplo/kafka/ApplicationTests.java
@@
-10,7
+10,6
@@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.context.annotation.Primary;
import org.springframework.test.context.ContextConfiguration;
-import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Consumer;
@@
-75,12
+74,18
@@
public class ApplicationTests extends GenericApplicationTests<String, Long>
{
@Primary
@Bean
{
@Primary
@Bean
- public
Consumer<ConsumerRecord<String, Long>> consum
er()
+ public
ApplicationRecordHandler recordHandl
er()
{
{
- return (record) ->
+ ApplicationRecordHandler recordHandler = new ApplicationRecordHandler();
+ return new ApplicationRecordHandler()
{
{
- if (record.value() == Long.MIN_VALUE)
- throw new RuntimeException("BOOM (Logic-Error)!");
+ @Override
+ public void accept(ConsumerRecord<String, Long> record)
+ {
+ if (record.value() == Long.MIN_VALUE)
+ throw new RuntimeException("BOOM (Logic-Error)!");
+ super.accept(record);
+ }
};
}
}
};
}
}