Skip to content

Commit 6d71849

Browse files
dfirovagcf-owl-bot[bot]
authored andcommitted
fix(samples) Add fulfillment places code sample: didn't work (#488)
* Removed hardcoded parts. * Changed delay. * Merge conflict resolved: updated test. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * PR fix: add fulfillment test. Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent d7012b1 commit 6d71849

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

retail/interactive-tutorials/src/main/java/product/AddFulfillmentPlaces.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public static void addFulfillmentPlaces(String productName, String placeId)
7777
serviceClient.addFulfillmentPlacesAsync(addFulfillmentPlacesRequest);
7878
// This is a long-running operation and its result is not immediately
7979
// present with get operations,thus we simulate wait with sleep method.
80-
System.out.println("Add fulfillment places, wait 30 seconds: ");
81-
TimeUnit.SECONDS.sleep(30);
80+
System.out.println("Add fulfillment places, wait 45 seconds: ");
81+
TimeUnit.SECONDS.sleep(45);
8282
}
8383
}
8484
}

retail/interactive-tutorials/src/test/java/product/AddFulfillmentPlacesTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public class AddFulfillmentPlacesTest {
4242

4343
@Before
4444
public void setUp() throws IOException, InterruptedException, ExecutionException {
45+
// TODO(developer): Replace these variables before running the sample.
4546
String projectId = ServiceOptions.getDefaultProjectId();
4647
String generatedProductId = UUID.randomUUID().toString();
4748
String productName =
@@ -64,7 +65,7 @@ public void testAddFulfillment() {
6465
String outputResult = bout.toString();
6566

6667
assertThat(outputResult).contains("Add fulfilment places with current date");
67-
assertThat(outputResult).contains("Add fulfillment places, wait 30 seconds");
68+
assertThat(outputResult).contains("Add fulfillment places, wait 45 seconds");
6869
}
6970

7071
@After

0 commit comments

Comments
 (0)