boolean isDeleted = Action.DELETE.name() .equals(visitor.documentUpdateAction);
return; if (method.equals(Action.POST.toString())) { if (path.equals(this.servicePrefix)) {
Action action = Action.valueOf(doc.documentUpdateAction); switch (action) { case PUT:
assertTrue(st.documentUpdateTimeMicros > startTimeMicros); assertTrue(st.documentUpdateAction != null); assertTrue(st.documentUpdateAction.equals(action.toString()));
assertTrue(st.documentUpdateTimeMicros > startTimeMicros); assertTrue(st.documentUpdateAction != null); assertTrue(st.documentUpdateAction.equals(action.toString()));
.setTermMatchValue(Action.POST.toString());
.setTermMatchValue(Action.POST.toString());
assertEquals(originalExpMicros, stForVersion.documentExpirationTimeMicros); } else if (v == 1) { assertEquals(Action.DELETE.toString(), stForVersion.documentUpdateAction);
selectedState.documentUpdateAction = Action.DELETE.toString(); this.host.saveServiceState(s, Operation.createDelete(UriUtils.buildUri(this.host, s.getSelfLink())).setReferer(s.getUri()),
ExampleServiceState.class); if (s.documentVersion < 1) { if (!s.documentUpdateAction.equals(Action.POST.toString())) { failure[0] = new IllegalStateException( "documentUpdateAction not expected:" if (!s.documentUpdateAction.equals(Action.PATCH.toString())) { failure[0] = new IllegalStateException( "documentUpdateAction not expected:"
ExampleServiceState.class); if (s.documentVersion < 1) { if (!s.documentUpdateAction.equals(Action.POST.toString())) { failure[0] = new IllegalStateException( "documentUpdateAction not expected:" if (!s.documentUpdateAction.equals(Action.PATCH.toString())) { failure[0] = new IllegalStateException( "documentUpdateAction not expected:"
assertEquals(originalExpMicros, stForVersion.documentExpirationTimeMicros); } else if (v == 1) { assertEquals(Action.DELETE.toString(), stForVersion.documentUpdateAction);
for (DocumentStoredFieldVisitor visitor : visitorDocs) { if ((visitor.documentVersion == highestVersion && !Action.DELETE.toString().equals(lastUpdateAction)) || visitor.documentTombstoneTimeMicros != LuceneIndexDocumentHelper.ACTIVE_DOCUMENT_TOMBSTONE_TIME) { continue;
boolean toDelete = Action.DELETE.toString().equals(action);
linkedState.documentUpdateAction = op.getAction().name(); if (linkedState.documentKind == null) { linkedState.documentKind = Utils.buildKind(this.context.stateType);
QueryValidationServiceState.class); assertEquals(Action.DELETE.toString(), deletedState.documentUpdateAction);
this.results.documents.values().stream().forEach((doc) -> { ServiceDocument serviceDocument = (ServiceDocument) doc; if (serviceDocument.documentUpdateAction.equals(Action.DELETE.name())) { --state.results.documentCount; ++state.results.continuousResults.documentCountDeleted; } else if (serviceDocument.documentUpdateAction.equals(Action.POST.name()) && serviceDocument.documentVersion == 0) { ++state.results.documentCount; ++state.results.continuousResults.documentCountAdded; } else if (serviceDocument.documentUpdateAction.equals(Action.PATCH.name()) || serviceDocument.documentUpdateAction.equals(Action.PUT.name())) { ++state.results.continuousResults.documentCountUpdated;
QueryValidationServiceState.class); assertEquals(Action.DELETE.toString(), deletedState.documentUpdateAction);
boolean delete = Action.DELETE.name().equals(sd.documentUpdateAction) && !this.isSoftDeleteEnabled;