@@ -1065,7 +1065,8 @@ public void testRetentionUnauthorized() throws Exception {
1065
1065
public void testPersistence () throws Exception {
1066
1066
NamespaceName testNs = this .testLocalNamespaces .get (0 );
1067
1067
PersistencePolicies persistence1 = new PersistencePolicies (3 , 2 , 1 , 0.0 );
1068
- namespaces .setPersistence (testNs .getTenant (), testNs .getCluster (), testNs .getLocalName (), persistence1 );
1068
+ asyncRequests (response -> namespaces .setPersistence (response , testNs .getTenant (), testNs .getCluster (),
1069
+ testNs .getLocalName (), persistence1 ));
1069
1070
AsyncResponse response = mock (AsyncResponse .class );
1070
1071
namespaces .getPersistence (response , testNs .getTenant (), testNs .getCluster (), testNs .getLocalName ());
1071
1072
ArgumentCaptor <PersistencePolicies > captor = ArgumentCaptor .forClass (PersistencePolicies .class );
@@ -1079,7 +1080,8 @@ public void testPersistenceUnauthorized() throws Exception {
1079
1080
try {
1080
1081
NamespaceName testNs = this .testLocalNamespaces .get (3 );
1081
1082
PersistencePolicies persistence = new PersistencePolicies (3 , 2 , 1 , 0.0 );
1082
- namespaces .setPersistence (testNs .getTenant (), testNs .getCluster (), testNs .getLocalName (), persistence );
1083
+ asyncRequests (response -> namespaces .setPersistence (response , testNs .getTenant (), testNs .getCluster (),
1084
+ testNs .getLocalName (), persistence ));
1083
1085
fail ("Should fail" );
1084
1086
} catch (RestException e ) {
1085
1087
assertEquals (e .getResponse ().getStatus (), Status .UNAUTHORIZED .getStatusCode ());
0 commit comments