Revert "fix: fixed failing queries using aggregation pipeline (#26132)" (#27562)

This reverts commit 66d5027126.

> Pull Request Template
>
> Use this template to quickly create a well written pull request.
Delete all quotes before creating the pull request.
>
## Description
> Add a TL;DR when description is extra long (helps content team)
>
> Please include a summary of the changes and which issue has been
fixed. Please also include relevant motivation
> and context. List any dependencies that are required for this change
>
> Links to Notion, Figma or any other documents that might be relevant
to the PR
>
>
#### PR fixes following issue(s)
Fixes # (issue number)
> if no issue exists, please create an issue and ask the maintainers
about this first
>
>
#### Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video
>
>
#### Type of change
> Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Chore (housekeeping or task changes that don't impact user perception)
- This change requires a documentation update
>
>
>
## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [ ] Manual
- [ ] JUnit
- [ ] Jest
- [ ] Cypress
>
>
#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
This commit is contained in:
Trisha Anand 2023-09-22 13:34:26 +05:30 committed by GitHub
parent 7d4ecdb7a6
commit 42262825f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 45 additions and 141 deletions

View File

@ -15,7 +15,7 @@ import com.appsmith.server.dtos.ce.ImportActionResultDTO;
import com.appsmith.server.dtos.ce.ImportedActionAndCollectionMapsDTO;
import com.appsmith.server.helpers.ce.ImportApplicationPermissionProvider;
import com.appsmith.server.services.CrudService;
import com.mongodb.bulk.BulkWriteResult;
import com.mongodb.client.result.UpdateResult;
import org.springframework.data.domain.Sort;
import org.springframework.util.MultiValueMap;
import reactor.core.publisher.Flux;
@ -138,7 +138,7 @@ public interface NewActionServiceCE extends CrudService<NewAction, String> {
ImportActionCollectionResultDTO importActionCollectionResultDTO,
ImportActionResultDTO importActionResultDTO);
Mono<List<BulkWriteResult>> publishActions(String applicationId, AclPermission permission);
Mono<UpdateResult> publishActions(String applicationId, AclPermission permission);
Flux<PluginTypeAndCountDTO> countActionsByPluginType(String applicationId);
}

View File

@ -54,7 +54,7 @@ import com.appsmith.server.solutions.ApplicationPermission;
import com.appsmith.server.solutions.DatasourcePermission;
import com.appsmith.server.solutions.PagePermission;
import com.appsmith.server.solutions.PolicySolution;
import com.mongodb.bulk.BulkWriteResult;
import com.mongodb.client.result.UpdateResult;
import io.micrometer.observation.ObservationRegistry;
import jakarta.validation.Validator;
import lombok.extern.slf4j.Slf4j;
@ -1965,7 +1965,7 @@ public class NewActionServiceCEImpl extends BaseService<NewActionRepository, New
* @return
*/
@Override
public Mono<List<BulkWriteResult>> publishActions(String applicationId, AclPermission permission) {
public Mono<UpdateResult> publishActions(String applicationId, AclPermission permission) {
// delete the actions that were deleted in edit mode
return repository
.archiveDeletedUnpublishedActions(applicationId, permission)

View File

@ -173,9 +173,7 @@ public class BaseRepositoryImpl<T extends BaseDomain, ID extends Serializable>
.flatMapMany(principal -> {
Query query = new Query(notDeleted());
return mongoOperations.find(
query.cursorBatchSize(10000),
entityInformation.getJavaType(),
entityInformation.getCollectionName());
query, entityInformation.getJavaType(), entityInformation.getCollectionName());
});
}

View File

@ -2,7 +2,6 @@ package com.appsmith.server.repositories;
import com.appsmith.server.repositories.ce.CustomNewActionRepositoryCEImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.ReactiveMongoOperations;
import org.springframework.data.mongodb.core.convert.MongoConverter;
import org.springframework.stereotype.Component;
@ -15,8 +14,7 @@ public class CustomNewActionRepositoryImpl extends CustomNewActionRepositoryCEIm
public CustomNewActionRepositoryImpl(
ReactiveMongoOperations mongoOperations,
MongoConverter mongoConverter,
CacheableRepositoryHelper cacheableRepositoryHelper,
MongoTemplate mongoTemplate) {
super(mongoOperations, mongoConverter, cacheableRepositoryHelper, mongoTemplate);
CacheableRepositoryHelper cacheableRepositoryHelper) {
super(mongoOperations, mongoConverter, cacheableRepositoryHelper);
}
}

View File

@ -2,7 +2,6 @@ package com.appsmith.server.repositories;
import com.appsmith.server.repositories.ce.CustomNewPageRepositoryCEImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.ReactiveMongoOperations;
import org.springframework.data.mongodb.core.convert.MongoConverter;
import org.springframework.stereotype.Component;
@ -14,8 +13,7 @@ public class CustomNewPageRepositoryImpl extends CustomNewPageRepositoryCEImpl i
public CustomNewPageRepositoryImpl(
ReactiveMongoOperations mongoOperations,
MongoConverter mongoConverter,
CacheableRepositoryHelper cacheableRepositoryHelper,
MongoTemplate mongoTemplate) {
super(mongoOperations, mongoConverter, cacheableRepositoryHelper, mongoTemplate);
CacheableRepositoryHelper cacheableRepositoryHelper) {
super(mongoOperations, mongoConverter, cacheableRepositoryHelper);
}
}

View File

@ -22,7 +22,6 @@ import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;
import org.springframework.data.mongodb.core.query.UpdateDefinition;
import org.springframework.data.mongodb.repository.Meta;
import org.springframework.security.core.context.ReactiveSecurityContextHolder;
import org.springframework.util.CollectionUtils;
import reactor.core.publisher.Flux;
@ -167,7 +166,7 @@ public abstract class BaseAppsmithRepositoryCEImpl<T extends BaseDomain> {
return mongoOperations
.query(this.genericDomain)
.matching(query.cursorBatchSize(10000))
.matching(query)
.one()
.flatMap(obj -> setUserPermissionsInObject(obj, permissionGroups));
});
@ -332,7 +331,6 @@ public abstract class BaseAppsmithRepositoryCEImpl<T extends BaseDomain> {
});
}
@Meta(cursorBatchSize = 10000)
protected Mono<T> queryOne(
List<Criteria> criterias, List<String> projectionFieldNames, Optional<AclPermission> permission) {
Mono<Set<String>> permissionGroupsMono = getCurrentUserPermissionGroupsIfRequired(permission);
@ -541,7 +539,7 @@ public abstract class BaseAppsmithRepositoryCEImpl<T extends BaseDomain> {
sortOptional.ifPresent(sort -> query.with(sort));
return mongoOperations
.query(this.genericDomain)
.matching(query.cursorBatchSize(10000))
.matching(query)
.all()
.flatMap(obj -> setUserPermissionsInObject(obj, permissionGroups));
}

View File

@ -78,7 +78,7 @@ public interface CustomNewActionRepositoryCE extends AppsmithRepository<NewActio
Mono<List<BulkWriteResult>> bulkUpdate(List<NewAction> newActions);
Mono<List<BulkWriteResult>> publishActions(String applicationId, AclPermission permission);
Mono<UpdateResult> publishActions(String applicationId, AclPermission permission);
Mono<UpdateResult> archiveDeletedUnpublishedActions(String applicationId, AclPermission permission);

View File

@ -20,12 +20,9 @@ import lombok.extern.slf4j.Slf4j;
import org.bson.Document;
import org.bson.types.ObjectId;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.ReactiveMongoOperations;
import org.springframework.data.mongodb.core.aggregation.Aggregation;
import org.springframework.data.mongodb.core.aggregation.AggregationOperation;
import org.springframework.data.mongodb.core.aggregation.AggregationResults;
import org.springframework.data.mongodb.core.aggregation.Fields;
import org.springframework.data.mongodb.core.aggregation.AggregationUpdate;
import org.springframework.data.mongodb.core.aggregation.GroupOperation;
import org.springframework.data.mongodb.core.aggregation.MatchOperation;
import org.springframework.data.mongodb.core.aggregation.ProjectionOperation;
@ -55,15 +52,11 @@ import static org.springframework.data.mongodb.core.query.Criteria.where;
public class CustomNewActionRepositoryCEImpl extends BaseAppsmithRepositoryImpl<NewAction>
implements CustomNewActionRepositoryCE {
private final MongoTemplate mongoTemplate;
public CustomNewActionRepositoryCEImpl(
ReactiveMongoOperations mongoOperations,
MongoConverter mongoConverter,
CacheableRepositoryHelper cacheableRepositoryHelper,
MongoTemplate mongoTemplate) {
CacheableRepositoryHelper cacheableRepositoryHelper) {
super(mongoOperations, mongoConverter, cacheableRepositoryHelper);
this.mongoTemplate = mongoTemplate;
}
@Override
@ -578,33 +571,16 @@ public class CustomNewActionRepositoryCEImpl extends BaseAppsmithRepositoryImpl<
}
@Override
public Mono<List<BulkWriteResult>> publishActions(String applicationId, AclPermission permission) {
public Mono<UpdateResult> publishActions(String applicationId, AclPermission permission) {
Criteria applicationIdCriteria =
where(fieldName(QNewAction.newAction.applicationId)).is(applicationId);
// using aggregation update instead of regular update here
// it's required to set a field to a value of another field from the same domain
AggregationUpdate aggregationUpdate = AggregationUpdate.update()
.set(fieldName(QNewAction.newAction.publishedAction))
.toValue("$" + fieldName(QNewAction.newAction.unpublishedAction));
Mono<Set<String>> permissionGroupsMono =
getCurrentUserPermissionGroupsIfRequired(Optional.ofNullable(permission));
return permissionGroupsMono.flatMap(permissionGroups -> {
AggregationOperation matchAggregationWithPermission = null;
if (permission == null) {
matchAggregationWithPermission = Aggregation.match(new Criteria().andOperator(notDeleted()));
} else {
matchAggregationWithPermission = Aggregation.match(
new Criteria().andOperator(notDeleted(), userAcl(permissionGroups, permission)));
}
AggregationOperation matchAggregation = Aggregation.match(applicationIdCriteria);
AggregationOperation wholeProjection = Aggregation.project(NewAction.class);
AggregationOperation addFieldsOperation = Aggregation.addFields()
.addField(fieldName(QNewAction.newAction.publishedAction))
.withValueOf(Fields.field(fieldName(QNewAction.newAction.unpublishedAction)))
.build();
Aggregation combinedAggregation = Aggregation.newAggregation(
matchAggregation, matchAggregationWithPermission, wholeProjection, addFieldsOperation);
AggregationResults<NewAction> updatedResults =
mongoTemplate.aggregate(combinedAggregation, NewAction.class, NewAction.class);
return bulkUpdate(updatedResults.getMappedResults());
});
return updateByCriteria(List.of(applicationIdCriteria), aggregationUpdate, permission);
}
@Override

View File

@ -3,7 +3,7 @@ package com.appsmith.server.repositories.ce;
import com.appsmith.server.acl.AclPermission;
import com.appsmith.server.domains.NewPage;
import com.appsmith.server.repositories.AppsmithRepository;
import com.mongodb.bulk.BulkWriteResult;
import com.mongodb.client.result.UpdateResult;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@ -43,7 +43,5 @@ public interface CustomNewPageRepositoryCE extends AppsmithRepository<NewPage> {
Mono<NewPage> findByGitSyncIdAndDefaultApplicationId(
String defaultApplicationId, String gitSyncId, Optional<AclPermission> permission);
Mono<List<BulkWriteResult>> publishPages(Collection<String> pageIds, AclPermission permission);
Mono<List<BulkWriteResult>> bulkUpdate(List<NewPage> newPages);
Mono<UpdateResult> publishPages(Collection<String> pageIds, AclPermission permission);
}

View File

@ -9,32 +9,20 @@ import com.appsmith.server.domains.QNewPage;
import com.appsmith.server.dtos.PageDTO;
import com.appsmith.server.repositories.BaseAppsmithRepositoryImpl;
import com.appsmith.server.repositories.CacheableRepositoryHelper;
import com.mongodb.bulk.BulkWriteResult;
import com.mongodb.client.model.UpdateOneModel;
import com.mongodb.client.model.WriteModel;
import com.mongodb.client.result.UpdateResult;
import lombok.extern.slf4j.Slf4j;
import org.bson.Document;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.ReactiveMongoOperations;
import org.springframework.data.mongodb.core.aggregation.Aggregation;
import org.springframework.data.mongodb.core.aggregation.AggregationOperation;
import org.springframework.data.mongodb.core.aggregation.AggregationResults;
import org.springframework.data.mongodb.core.aggregation.Fields;
import org.springframework.data.mongodb.core.aggregation.AggregationUpdate;
import org.springframework.data.mongodb.core.convert.MongoConverter;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.util.CollectionUtils;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import static org.springframework.data.mongodb.core.query.Criteria.where;
@ -42,15 +30,11 @@ import static org.springframework.data.mongodb.core.query.Criteria.where;
public class CustomNewPageRepositoryCEImpl extends BaseAppsmithRepositoryImpl<NewPage>
implements CustomNewPageRepositoryCE {
private final MongoTemplate mongoTemplate;
public CustomNewPageRepositoryCEImpl(
ReactiveMongoOperations mongoOperations,
MongoConverter mongoConverter,
CacheableRepositoryHelper cacheableRepositoryHelper,
MongoTemplate mongoTemplate) {
CacheableRepositoryHelper cacheableRepositoryHelper) {
super(mongoOperations, mongoConverter, cacheableRepositoryHelper);
this.mongoTemplate = mongoTemplate;
}
@Override
@ -267,55 +251,14 @@ public class CustomNewPageRepositoryCEImpl extends BaseAppsmithRepositoryImpl<Ne
}
@Override
public Mono<List<BulkWriteResult>> publishPages(Collection<String> pageIds, AclPermission permission) {
public Mono<UpdateResult> publishPages(Collection<String> pageIds, AclPermission permission) {
Criteria applicationIdCriteria = where(fieldName(QNewPage.newPage.id)).in(pageIds);
// using aggregation update instead of regular update here
// it's required to set a field to a value of another field from the same domain
AggregationUpdate aggregationUpdate = AggregationUpdate.update()
.set(fieldName(QNewPage.newPage.publishedPage))
.toValue("$" + fieldName(QNewPage.newPage.unpublishedPage));
Mono<Set<String>> permissionGroupsMono =
getCurrentUserPermissionGroupsIfRequired(Optional.ofNullable(permission));
return permissionGroupsMono.flatMap(permissionGroups -> {
AggregationOperation matchAggregationWithPermission = null;
if (permission == null) {
matchAggregationWithPermission = Aggregation.match(new Criteria().andOperator(notDeleted()));
} else {
matchAggregationWithPermission = Aggregation.match(
new Criteria().andOperator(notDeleted(), userAcl(permissionGroups, permission)));
}
AggregationOperation matchAggregation = Aggregation.match(applicationIdCriteria);
AggregationOperation wholeProjection = Aggregation.project(NewPage.class);
AggregationOperation addFieldsOperation = Aggregation.addFields()
.addField(fieldName(QNewPage.newPage.publishedPage))
.withValueOf(Fields.field(fieldName(QNewPage.newPage.unpublishedPage)))
.build();
Aggregation combinedAggregation = Aggregation.newAggregation(
matchAggregation, matchAggregationWithPermission, wholeProjection, addFieldsOperation);
AggregationResults<NewPage> updatedResults =
mongoTemplate.aggregate(combinedAggregation, NewPage.class, NewPage.class);
return bulkUpdate(updatedResults.getMappedResults());
});
}
@Override
public Mono<List<BulkWriteResult>> bulkUpdate(List<NewPage> newPages) {
if (CollectionUtils.isEmpty(newPages)) {
return Mono.just(Collections.emptyList());
}
// convert the list of new pages to a list of DBObjects
List<WriteModel<Document>> dbObjects = newPages.stream()
.map(newPage -> {
assert newPage.getId() != null;
Document document = new Document();
mongoOperations.getConverter().write(newPage, document);
document.remove("_id");
return (WriteModel<Document>) new UpdateOneModel<Document>(
new Document("_id", new ObjectId(newPage.getId())), new Document("$set", document));
})
.collect(Collectors.toList());
return mongoOperations
.getCollection(mongoOperations.getCollectionName(NewPage.class))
.flatMapMany(documentMongoCollection -> documentMongoCollection.bulkWrite(dbObjects))
.collectList();
return updateByCriteria(List.of(applicationIdCriteria), aggregationUpdate, permission);
}
}

View File

@ -3,17 +3,12 @@ package com.appsmith.server.repositories.ce;
import com.appsmith.server.domains.NewAction;
import com.appsmith.server.repositories.BaseRepository;
import com.appsmith.server.repositories.CustomNewActionRepository;
import org.springframework.data.mongodb.repository.Meta;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
public interface NewActionRepositoryCE extends BaseRepository<NewAction, String>, CustomNewActionRepository {
@Meta(cursorBatchSize = 10000)
Flux<NewAction> findByApplicationId(String applicationId);
@Meta(cursorBatchSize = 10000)
Flux<NewAction> findAllByIdIn(Iterable<String> ids);
Mono<Long> countByDeletedAtNull();
}

View File

@ -50,7 +50,6 @@ import com.appsmith.server.solutions.ApplicationPermission;
import com.appsmith.server.solutions.PagePermission;
import com.appsmith.server.solutions.WorkspacePermission;
import com.google.common.base.Strings;
import com.mongodb.bulk.BulkWriteResult;
import com.mongodb.client.result.UpdateResult;
import jakarta.annotation.Nullable;
import lombok.RequiredArgsConstructor;
@ -1147,7 +1146,7 @@ public class ApplicationPageServiceCEImpl implements ApplicationPageServiceCE {
if (isPublishedManually) {
application.setLastDeployedAt(Instant.now());
}
Mono<List<BulkWriteResult>> publishPagesMono =
Mono<UpdateResult> publishPagesMono =
newPageService.publishPages(editedPageIds, pagePermission.getEditPermission());
// Archive the deleted pages and save the application changes and then return the pages so that
@ -1157,7 +1156,7 @@ public class ApplicationPageServiceCEImpl implements ApplicationPageServiceCE {
})
.cache(); // caching as we'll need this to send analytics attributes after publishing the app
Mono<List<BulkWriteResult>> publishActionsMono =
Mono<UpdateResult> publishActionsMono =
newActionService.publishActions(applicationId, actionPermission.getEditPermission());
// this is a map of pluginType to count of actions for that pluginType, required for analytics

View File

@ -7,7 +7,7 @@ import com.appsmith.server.domains.NewPage;
import com.appsmith.server.dtos.ApplicationPagesDTO;
import com.appsmith.server.dtos.PageDTO;
import com.appsmith.server.services.CrudService;
import com.mongodb.bulk.BulkWriteResult;
import com.mongodb.client.result.UpdateResult;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@ -93,5 +93,5 @@ public interface NewPageServiceCE extends CrudService<NewPage, String> {
Flux<NewPage> findPageSlugsByApplicationIds(List<String> applicationIds, AclPermission aclPermission);
Mono<List<BulkWriteResult>> publishPages(Collection<String> pageIds, AclPermission permission);
Mono<UpdateResult> publishPages(Collection<String> pageIds, AclPermission permission);
}

View File

@ -23,7 +23,7 @@ import com.appsmith.server.services.BaseService;
import com.appsmith.server.services.UserDataService;
import com.appsmith.server.solutions.ApplicationPermission;
import com.appsmith.server.solutions.PagePermission;
import com.mongodb.bulk.BulkWriteResult;
import com.mongodb.client.result.UpdateResult;
import jakarta.validation.Validator;
import lombok.extern.slf4j.Slf4j;
import net.minidev.json.JSONObject;
@ -696,7 +696,7 @@ public class NewPageServiceCEImpl extends BaseService<NewPageRepository, NewPage
}
@Override
public Mono<List<BulkWriteResult>> publishPages(Collection<String> pageIds, AclPermission permission) {
public Mono<UpdateResult> publishPages(Collection<String> pageIds, AclPermission permission) {
return repository.publishPages(pageIds, permission);
}
}

View File

@ -24,6 +24,7 @@ import com.appsmith.server.solutions.ApplicationPermission;
import com.appsmith.server.solutions.DatasourcePermission;
import com.appsmith.server.solutions.PagePermission;
import com.appsmith.server.solutions.PolicySolution;
import com.mongodb.client.result.UpdateResult;
import io.micrometer.observation.ObservationRegistry;
import jakarta.validation.Validator;
import lombok.extern.slf4j.Slf4j;
@ -39,8 +40,6 @@ import reactor.core.publisher.Mono;
import reactor.core.scheduler.Scheduler;
import reactor.test.StepVerifier;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.ArgumentMatchers.anyString;
@ -201,8 +200,9 @@ public class NewActionServiceUnitTest {
@Test
public void testPublishActionArchivesAndPublishesActions() {
String applicationId = "dummy-application-id";
List updateResult = Mockito.mock(List.class);
Mockito.when(updateResult.size()).thenReturn(10);
UpdateResult updateResult = Mockito.mock(UpdateResult.class);
Mockito.when(updateResult.getModifiedCount()).thenReturn(10L);
Mockito.when(updateResult.getMatchedCount()).thenReturn(5L);
Mockito.when(newActionRepository.archiveDeletedUnpublishedActions(
applicationId, actionPermission.getEditPermission()))
@ -213,7 +213,8 @@ public class NewActionServiceUnitTest {
StepVerifier.create(newActionService.publishActions(applicationId, actionPermission.getEditPermission()))
.assertNext(updateResult1 -> {
assertEquals(10, updateResult1.size());
assertEquals(10L, updateResult1.getModifiedCount());
assertEquals(5L, updateResult1.getMatchedCount());
})
.verifyComplete();
}