MINOR: Tag RaftEventSimulationTest as integration and tweak it#9925
MINOR: Tag RaftEventSimulationTest as integration and tweak it#9925ijuma merged 2 commits intoapache:trunkfrom
RaftEventSimulationTest as integration and tweak it#9925Conversation
The test takes over 1 minute to run, so it should not be considered a unit test. Also: * Replace `test` prefix with `check` prefix for helper methods. A common mistake is to forget to add the @test annotation, so it's good to use a different naming convention to methods that should have the annotation versus methods that should not. * Replace `Action` functional interface with built-in `Runnable`.
chia7712
left a comment
There was a problem hiding this comment.
There are other functional interfaces (Validation and Invariant). The setter (addInvariant and addValidation) should be clear enough so we don't need to keep those function interfaces. WDTY?
| @@ -59,6 +60,7 @@ | |||
| import static org.junit.jupiter.api.Assertions.fail; | |||
| import static org.junit.jupiter.api.Assumptions.assumeTrue; | |||
There was a problem hiding this comment.
Is assumeTrue used in this test? I test ```RaftEventSimulationTest`` but there is no ignored test cases.
There was a problem hiding this comment.
Good catch, removed since it's not currently needed.
|
@chia7712 What are you suggesting instead of |
Runnable |
|
I removed the @FunctionalInterface annotation from |
|
@chia7712 Does this look ok to you? I am interested in making |
…e-allocations-lz4 * apache-github/trunk: (562 commits) MINOR: remove unused code from MessageTest (apache#9961) MINOR: Fix visibility of Log.{unflushedMessages, addSegment} methods (apache#9966) KAFKA-12229: Restore original class loader in integration tests using EmbeddedConnectCluster during shutdown (apache#9942) KAFKA-12190: Fix setting of file permissions on non-POSIX filesystems (apache#9947) MINOR: Remove `toStruct` and `fromStruct` methods from generated protocol classes (apache#9960) MINOR: Fix typo in Utils#toPositive (apache#9943) MINOR: MessageUtil: remove some deadcode (apache#9931) MINOR: Update zstd-jni to 1.4.8-2 (apache#9957) MINOR: Revert assertion in MockProducerTest (apache#9956) MINOR: Optimize assertions in unit tests (apache#9955) MINOR: Tag `RaftEventSimulationTest` as `integration` and tweak it (apache#9925) MINOR: Update to Gradle 6.8.1 (apache#9953) MINOR: A few small group coordinator cleanups (apache#9952) MINOR: Upgrade ducktape to version 0.8.1 (apache#9933) MINOR: fix record time in test shouldWipeOutStandbyStateDirectoryIfCheckpointIsMissing (apache#9948) MINOR: Restore interrupt status when closing (apache#9863) KAFKA-10357: Extract setup of repartition topics from Streams partition assignor (apache#9848) KAFKA-12212; Bump Metadata API version to remove `ClusterAuthorizedOperations` fields (KIP-700) (apache#9945) MINOR: log 2min processing summary of StreamThread loop (apache#9941) MINOR: Drop enable.metadata.quorum config (apache#9934) ...
The test takes over 1 minute to run, so it should not be considered a
unit test.
Also:
testprefix withcheckprefix for helper methods. A commonmistake is to forget to add the @test annotation, so it's good to use a
different naming convention for methods that should have the annotation
versus methods that should not.
Actionfunctional interface with built-inRunnable.assumeTrue.@FunctionalInterfacefromInvariantsince it's not usedin that way.
Committer Checklist (excluded from commit message)