authorjapps / authorjapps/zerocode
Running SetUp And TearDown code when testing Kafka using the ZeroCode
- Dominant language
- Java
- Stars
- 1k
- Forks
- 453
- Avg merge
- 7d 2h
- Merged PRs (30d)
- 5
Description
Hi
As the title suggests, I am unable to Run Setup and Teardown methods when Testing Kafka.
I use @Before Annotations on my "setup" Methods but nothing seems to work.
My code as below
```
@TargetEnv("Kafka/KafkaTestServer.properties")
@RunWith(ZeroCodeUnitRunner.class)
public class TestClass{
@Before
public void before() {
//before code here NB actual code omitted
}
@Test
@JsonTestCase("path/to/testcase.json")
public void TestOne() {
}
}
```
When i remove '@JsonTestCase' annotation it works.
Any help would be appreciated
Contributor guide
Research direction
Start with TestClass and compare ZeroCodeUnitRunner behavior when @JsonTestCase is present versus when it is removed. Trace how @Before methods are handled for the Kafka test and determine what completion means for setup and teardown execution, using the referenced Kafka/KafkaTestServer.properties configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kafka
- Domain
- stream-processing, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100