FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(samples): lro added out-of-order step. by dfirova · Pull Request #539 · googleapis/java-retail · GitHub

This repository was archived by the owner on Oct 3, 2023. It is now read-only.
/ java-retail Public archive
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .java  (3) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ public static void addFulfillmentPlaces(String productName, String placeId)
.setAllowMissing(true)
.build();

// To send an out-of-order request assign the invalid AddTime here:
// Instant instant = LocalDateTime.now().minusDays(1).toInstant(ZoneOffset.UTC);
// Timestamp previousDay = Timestamp.newBuilder()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We strongly prefer not having commented out code, as it's not tested or compiled.

// .setSeconds(instant.getEpochSecond())
// .setNanos(instant.getNano())
// .build();
// addFulfillmentPlacesRequest =
// addFulfillmentPlacesRequest.toBuilder().setAddTime(previousDay).build();

System.out.println("Add fulfillment request " + addFulfillmentPlacesRequest);

// Initialize client that will be used to send requests. This client only
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ public static void removeFulfillmentPlaces(String productName, String storeId)
.setAllowMissing(true)
.build();

// To send an out-of-order request assign the invalid RemoveTime here:
// Instant instant = LocalDateTime.now().minusDays(1).toInstant(ZoneOffset.UTC);
// Timestamp previousDay = Timestamp.newBuilder()
// .setSeconds(instant.getEpochSecond())
// .setNanos(instant.getNano())
// .build();
// removeFulfillmentRequest =
// removeFulfillmentRequest.toBuilder().setRemoveTime(previousDay).build();

System.out.println("Remove fulfillment request " + removeFulfillmentRequest);

// Initialize client that will be used to send requests. This client only
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ public static void setInventory(String productName) throws IOException, Interrup
.build();
System.out.printf("Set inventory request: %s%n", setInventoryRequest);

// To send an out-of-order request assign the invalid SetTime here:
// Instant instant = LocalDateTime.now().minusDays(1).toInstant(ZoneOffset.UTC);
// Timestamp previousDay = Timestamp.newBuilder()
// .setSeconds(instant.getEpochSecond())
// .setNanos(instant.getNano())
// .build();
// setInventoryRequest = setInventoryRequest.toBuilder().setSetTime(previousDay).build();

// Initialize client that will be used to send requests. This client only
// needs to be created once, and can be reused for multiple requests. After
// completing all of your requests, call the "close" method on the client to
Expand Down

Back | FazBrowse Home | New Git URL