Skip to content

Commit

Permalink
feat: fixe the build log with timeout failure
Browse files Browse the repository at this point in the history
  • Loading branch information
athakor committed Jun 2, 2020
1 parent 0ffd3f2 commit d8b9176
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -134,17 +134,17 @@ private LocalDatastoreHelper(Builder builder) {
List<String> gcloudCommand = new ArrayList<>(Arrays.asList(GCLOUD_CMD_TEXT.split(" ")));
gcloudCommand.add(GCLOUD_CMD_PORT_FLAG + "localhost:" + getPort());
gcloudCommand.add(CONSISTENCY_FLAG + builder.consistency);
if (!storeOnDisk) {
if (!builder.storeOnDisk) {
gcloudCommand.add("--no-store-on-disk");
}
GcloudEmulatorRunner gcloudRunner =
new GcloudEmulatorRunner(gcloudCommand, VERSION_PREFIX, MIN_VERSION);
List<String> binCommand = new ArrayList<>(Arrays.asList(binName, "start"));
binCommand.add("--testing");
binCommand.add(BIN_CMD_PORT_FLAG + getPort());
binCommand.add(CONSISTENCY_FLAG + consistency);
if (gcdPath != null) {
gcloudCommand.add("--data-dir=" + gcdPath.toString());
binCommand.add(CONSISTENCY_FLAG + getConsistency());
if (builder.dataDir != null) {
gcloudCommand.add("--data-dir=" + getGcdPath());
}
DownloadableEmulatorRunner downloadRunner =
new DownloadableEmulatorRunner(binCommand, EMULATOR_URL, MD5_CHECKSUM);
Expand Down Expand Up @@ -220,7 +220,7 @@ public boolean isStoreOnDisk() {
* consistency of non-ancestor queries; non-ancestor queries are eventually consistent.
*/
public static LocalDatastoreHelper create(double consistency) {
return LocalDatastoreHelper.newBuilder().setConsistency(consistency).build();
return LocalDatastoreHelper.newBuilder().setConsistency(consistency).setPort(0).build();
}

/**
Expand Down Expand Up @@ -258,7 +258,7 @@ public static LocalDatastoreHelper create(int port) {
* all writes are immediately visible.
*/
public static LocalDatastoreHelper create() {
return LocalDatastoreHelper.newBuilder().build();
return LocalDatastoreHelper.newBuilder().setConsistency(DEFAULT_CONSISTENCY).build();
}

/**
Expand Down

0 comments on commit d8b9176

Please sign in to comment.