authorjapps / authorjapps/zerocode

Running SetUp And TearDown code when testing Kafka using the ZeroCode

Open
#311 3 comments 0 reactions 0 assignees View on GitHub
kafka
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.