Skip to content

Commit

Permalink
fix(samples) Add fulfillment places code sample: didn't work (#488)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
dfirova and gcf-owl-bot[bot] authored Aug 11, 2022
1 parent fa0af0f commit ced0264
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ public static void addFulfillmentPlaces(String productName, String placeId)
serviceClient.addFulfillmentPlacesAsync(addFulfillmentPlacesRequest);
// This is a long-running operation and its result is not immediately
// present with get operations,thus we simulate wait with sleep method.
System.out.println("Add fulfillment places, wait 30 seconds: ");
TimeUnit.SECONDS.sleep(30);
System.out.println("Add fulfillment places, wait 45 seconds: ");
TimeUnit.SECONDS.sleep(45);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class AddFulfillmentPlacesTest {

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

assertThat(outputResult).contains("Add fulfilment places with current date");
assertThat(outputResult).contains("Add fulfillment places, wait 30 seconds");
assertThat(outputResult).contains("Add fulfillment places, wait 45 seconds");
}

@After
Expand Down

0 comments on commit ced0264

Please sign in to comment.