Skip to content

Commit 4a8a037

Browse files
committed
feat(test): cleanup synonym sets after tests
1 parent a7871ce commit 4a8a037

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/java/org/typesense/api/Helper.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,5 +226,13 @@ public void teardown() throws Exception {
226226
for (StopwordsSetSchema s : stopwords.getStopwords()) {
227227
client.stopwords(s.getId()).delete();
228228
}
229+
230+
try {
231+
SynonymSetSchema[] synonymSets = client.synonymSets().retrieve();
232+
for (SynonymSetSchema s : synonymSets) {
233+
client.synonymSet(s.getName()).delete();
234+
}
235+
} catch (Exception e) {
236+
}
229237
}
230238
}

0 commit comments

Comments
 (0)