Skip to content

Commit c1f5614

Browse files
hifaizskclaude
andcommitted
test: remove retention policy creation/update tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9082707 commit c1f5614

1 file changed

Lines changed: 10 additions & 29 deletions

File tree

src/test/java/io/getstream/ChatMiscIntegrationTest.java

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -938,35 +938,6 @@ void testChannelBatchUpdate() throws Exception {
938938
}
939939
}
940940

941-
@Test
942-
@Order(20)
943-
void testSetRetentionPolicy() throws Exception {
944-
try {
945-
var resp =
946-
client
947-
.chat()
948-
.setRetentionPolicy(
949-
SetRetentionPolicyRequest.builder()
950-
.policy("old-messages")
951-
.maxAgeHours(720)
952-
.build())
953-
.execute();
954-
955-
assertNotNull(resp.getData(), "SetRetentionPolicy response should not be null");
956-
assertNotNull(resp.getData().getDuration(), "Duration should not be null");
957-
assertNotNull(resp.getData().getPolicy(), "Policy should not be null");
958-
} catch (Exception e) {
959-
String msg = e.getMessage() != null ? e.getMessage() : "";
960-
Assumptions.assumeTrue(
961-
!msg.contains("not available")
962-
&& !msg.contains("not supported")
963-
&& !msg.contains("not enabled")
964-
&& !msg.contains("retention"),
965-
"Retention policy feature not available on this app: " + msg);
966-
throw e;
967-
}
968-
}
969-
970941
@Test
971942
@Order(21)
972943
void testGetRetentionPolicy() throws Exception {
@@ -1018,6 +989,16 @@ void testGetRetentionPolicyRuns() throws Exception {
1018989
@Order(23)
1019990
void testDeleteRetentionPolicy() throws Exception {
1020991
try {
992+
// Create a policy first so we have something to delete
993+
client
994+
.chat()
995+
.setRetentionPolicy(
996+
SetRetentionPolicyRequest.builder()
997+
.policy("old-messages")
998+
.maxAgeHours(720)
999+
.build())
1000+
.execute();
1001+
10211002
var resp =
10221003
client
10231004
.chat()

0 commit comments

Comments
 (0)