-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[Improve][E2E] Improve redis test for delete hash #9946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
[Improve][E2E] Improve redis test for delete hash #9946
Conversation
} | ||
redisSinkWriter.close(); | ||
Assertions.assertEquals(2, jedis.hlen(key)); | ||
jedis.del(key); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
How much can this modification time be reduced? |
This modification reduced the test time by almost 50%. @zhangshenghang |
@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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,I will update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
Do you have actual screenshots? |
If we apply these changes, we can reduce the time even more. ![]() ![]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.