Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the issue of ChangeFeedProcessorCodeSnippet #12894

Merged
merged 1 commit into from
Jul 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License.
package com.azure.cosmos;

import com.azure.cosmos.implementation.TestConfigurations;
import com.fasterxml.jackson.databind.JsonNode;

/**
Expand All @@ -11,7 +12,12 @@ public class ChangeFeedProcessorCodeSnippet {

public void changeFeedProcessorBuilderCodeSnippet() {
String hostName = "test-host-name";
CosmosAsyncClient cosmosAsyncClient = new CosmosClientBuilder().buildAsyncClient();
CosmosAsyncClient cosmosAsyncClient = new CosmosClientBuilder()
.endpoint(TestConfigurations.HOST)
.key(TestConfigurations.MASTER_KEY)
.contentResponseOnWriteEnabled(true)
.consistencyLevel(ConsistencyLevel.SESSION)
.buildAsyncClient();
CosmosAsyncDatabase cosmosAsyncDatabase = cosmosAsyncClient.getDatabase("testDb");
CosmosAsyncContainer feedContainer = cosmosAsyncDatabase.getContainer("feedContainer");
CosmosAsyncContainer leaseContainer = cosmosAsyncDatabase.getContainer("leaseContainer");
Expand All @@ -31,7 +37,12 @@ public void changeFeedProcessorBuilderCodeSnippet() {

public void handleChangesCodeSnippet() {
String hostName = "test-host-name";
CosmosAsyncClient cosmosAsyncClient = new CosmosClientBuilder().buildAsyncClient();
CosmosAsyncClient cosmosAsyncClient = new CosmosClientBuilder()
.endpoint(TestConfigurations.HOST)
.key(TestConfigurations.MASTER_KEY)
.contentResponseOnWriteEnabled(true)
.consistencyLevel(ConsistencyLevel.SESSION)
.buildAsyncClient();
CosmosAsyncDatabase cosmosAsyncDatabase = cosmosAsyncClient.getDatabase("testDb");
CosmosAsyncContainer feedContainer = cosmosAsyncDatabase.getContainer("feedContainer");
CosmosAsyncContainer leaseContainer = cosmosAsyncDatabase.getContainer("leaseContainer");
Expand Down