Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
borkaehw committed Jul 10, 2019
1 parent 4ad873c commit ec693c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public PathFragment getExecPath() {
FileSystemUtils.createDirectoryAndParents(stderr.getParentDirectory());
outErr = new FileOutErr(stdout, stderr);
RemoteOptions remoteOptions = Options.getDefaults(RemoteOptions.class);
remoteOptions.remoteCache = "grpc://doesnotexist:90";
RemoteRetrier retrier =
TestUtils.newRemoteRetrier(
() -> new ExponentialBackoff(remoteOptions),
Expand All @@ -219,6 +220,7 @@ public PathFragment getExecPath() {
new SimpleBlobStoreActionCache(
remoteOptions,
SimpleBlobStoreFactory.create(
null,
remoteOptions,
channel.retain(),
creds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import static com.google.devtools.build.lib.testutil.MoreAsserts.assertThrows;

import com.google.devtools.build.lib.clock.JavaClock;
import com.google.devtools.build.lib.remote.blobstore.CombinedDiskHttpBlobStore;
import com.google.devtools.build.lib.remote.blobstore.CombinedDiskRemoteBlobStore;
import com.google.devtools.build.lib.remote.blobstore.ConcurrentMapBlobStore;
import com.google.devtools.build.lib.remote.blobstore.OnDiskBlobStore;
import com.google.devtools.build.lib.remote.blobstore.SimpleBlobStore;
Expand Down Expand Up @@ -59,7 +59,7 @@ public void createCombinedCacheWithExistingWorkingDirectory() throws IOException
SimpleBlobStore blobStore =
SimpleBlobStoreFactory.create(remoteOptions, /* creds= */ null, workingDirectory);

assertThat(blobStore).isInstanceOf(CombinedDiskHttpBlobStore.class);
assertThat(blobStore).isInstanceOf(CombinedDiskRemoteBlobStore.class);
}

@Test
Expand All @@ -71,7 +71,7 @@ public void createCombinedCacheWithNotExistingWorkingDirectory() throws IOExcept
SimpleBlobStore blobStore =
SimpleBlobStoreFactory.create(remoteOptions, /* creds= */ null, workingDirectory);

assertThat(blobStore).isInstanceOf(CombinedDiskHttpBlobStore.class);
assertThat(blobStore).isInstanceOf(CombinedDiskRemoteBlobStore.class);
assertThat(workingDirectory.exists()).isTrue();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,11 @@ private SimpleBlobStoreActionCache newClient(RemoteOptions remoteOptions, Suppli
ByteStreamUploader uploader =
new ByteStreamUploader(remoteOptions.remoteInstanceName, channel.retain(), creds,
remoteOptions.remoteTimeout, retrier);
remoteOptions.remoteCache = "grpc://doesnotexist:90";
return new SimpleBlobStoreActionCache(
remoteOptions,
SimpleBlobStoreFactory.create(
null,
remoteOptions,
channel.retain(),
creds,
Expand Down

0 comments on commit ec693c7

Please sign in to comment.