Skip to content
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

Fix Search/Gears test regression #3552

Merged
merged 4 commits into from
Sep 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/test/java/redis/clients/jedis/modules/gears/GearsTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package redis.clients.jedis.modules.gears;

import org.junit.Before;
import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;

Expand Down Expand Up @@ -32,8 +32,14 @@ public static void prepare() {
RedisModuleCommandsTestBase.prepare();
}

@Before
public void deleteFunctions() {
@After
@Override
public void tearDown() throws Exception {
deleteFunctions(); // delete functions before closing connections
super.tearDown();
}

protected void deleteFunctions() {
List<GearsLibraryInfo> libraries = client.tFunctionList();
libraries.stream().map(GearsLibraryInfo::getName).forEach(library -> client.tFunctionDelete(library));
}
Expand Down
Loading