Skip to content

Commit

Permalink
Merge branch 'master' into gears-test
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 authored Sep 23, 2023
2 parents 53f06e8 + fae5fc6 commit 2b8b96d
Show file tree
Hide file tree
Showing 3 changed files with 314 additions and 312 deletions.
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,8 +1,8 @@
package redis.clients.jedis.modules.gears;

import org.hamcrest.Matchers;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

Expand Down Expand Up @@ -42,8 +42,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

0 comments on commit 2b8b96d

Please sign in to comment.