Skip to content

Conversation

chl-wxp
Copy link
Contributor

@chl-wxp chl-wxp commented Oct 14, 2025

There are currently too many use cases for redis' e2e, which will slow down the overall e2e time. Most of the use cases can be implemented through unit tests and I will optimize these e2e, which is the first merge request.

image

@github-actions github-actions bot added the e2e label Oct 14, 2025
@chl-wxp
Copy link
Contributor Author

chl-wxp commented Oct 15, 2025

@Hisoka-X @hailin0

}
redisSinkWriter.close();
Assertions.assertEquals(2, jedis.hlen(key));
jedis.del(key);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think converting this e2e test to a unit test would have any impact on overall stability or integration coverage?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is not necessary to submit configuration files to implement some functional points in redis. Unit testing can be used to satisfy this requirement. In addition, nearly 40 test tasks will slow down the e2e efficiency of this module.

@zhangshenghang
Copy link
Member

How much can this modification time be reduced?

@dybyte
Copy link
Contributor

dybyte commented Oct 15, 2025

How much can this modification time be reduced?

This modification reduced the test time by almost 50%. @zhangshenghang

Comment on lines 635 to 636
@TestTemplate
public void testFakeToRedisDeleteHashTest(TestContainer container)
throws IOException, InterruptedException {
Container.ExecResult execResult =
container.executeJob("/fake-to-redis-test-delete-hash.conf");
Assertions.assertEquals(0, execResult.getExitCode());
Assertions.assertEquals(2, jedis.hlen("hash_check"));
jedis.del("hash_check");
public void testFakeToRedisDeleteHashTest(TestContainer container) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@TestTemplate
public void testFakeToRedisDeleteHashTest(TestContainer container)
throws IOException, InterruptedException {
Container.ExecResult execResult =
container.executeJob("/fake-to-redis-test-delete-hash.conf");
Assertions.assertEquals(0, execResult.getExitCode());
Assertions.assertEquals(2, jedis.hlen("hash_check"));
jedis.del("hash_check");
public void testFakeToRedisDeleteHashTest(TestContainer container) throws IOException {
@Test
public void testFakeToRedisDeleteHashTest() throws IOException {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK,I will update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@zhangshenghang
Copy link
Member

How much can this modification time be reduced?

This modification reduced the test time by almost 50%. @zhangshenghang

Do you have actual screenshots?

@dybyte
Copy link
Contributor

dybyte commented Oct 16, 2025

Do you have actual screenshots?

If we apply these changes, we can reduce the time even more.

before after

Copy link
Contributor

@dybyte dybyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants