File tree Expand file tree Collapse file tree
src/test/java/io/getstream Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -985,38 +985,4 @@ void testGetRetentionPolicyRuns() throws Exception {
985985 }
986986 }
987987
988- @ Test
989- @ Order (23 )
990- void testDeleteRetentionPolicy () throws Exception {
991- 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-
1002- var resp =
1003- client
1004- .chat ()
1005- .deleteRetentionPolicy (
1006- DeleteRetentionPolicyRequest .builder ().policy ("old-messages" ).build ())
1007- .execute ();
1008-
1009- assertNotNull (resp .getData (), "DeleteRetentionPolicy response should not be null" );
1010- assertNotNull (resp .getData ().getDuration (), "Duration should not be null" );
1011- } catch (Exception e ) {
1012- String msg = e .getMessage () != null ? e .getMessage () : "" ;
1013- Assumptions .assumeTrue (
1014- !msg .contains ("not available" )
1015- && !msg .contains ("not supported" )
1016- && !msg .contains ("not enabled" )
1017- && !msg .contains ("retention" ),
1018- "Retention policy feature not available on this app: " + msg );
1019- throw e ;
1020- }
1021- }
1022988}
You can’t perform that action at this time.
0 commit comments