Skip to content

Commit 940b836

Browse files
andrey-qlogicchingor13
authored andcommitted
---
yaml --- r: 12751 b: refs/heads/autosynth-monitoring c: a9a7044 h: refs/heads/master i: 12749: f305701 12747: 54f887f 12743: ce42775 12735: 9e8a28b
1 parent dbe0ecb commit 940b836

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

  • branches/autosynth-monitoring/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/it

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ refs/tags/v0.67.0: 30b56f02092efc6f3c3667650ea8b8825003e0b7
115115
refs/heads/autosynth-compute: 986ec89964354eeecb8d259ddc23c85c75e4df5b
116116
refs/heads/autosynth-container: d0346e84b1f26e3dc10444450a998f357a43bcef
117117
refs/heads/autosynth-dataproc: bc74a8841bc1693d7945d991d15979df550b1fd1
118-
refs/heads/autosynth-monitoring: a6a23024f0328be03ed4f40fed9e5cab8f875e68
118+
refs/heads/autosynth-monitoring: a9a70442bf6bafbf46c82a76945632a455f2a4c1
119119
refs/heads/autosynth-pubsub: 5a23c921229ede711e9fb37341ecd08a6f8ff216
120120
refs/heads/autosynth-video-intelligence: 3e8faeeee2f803271529bd6e89b621c1ca098628
121121
refs/heads/autosynth-vision: d758c43ba2ef4f4f7ad07b722617cb39fe3f29db

branches/autosynth-monitoring/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/it/ITGcsNio.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
import org.junit.AfterClass;
6363
import org.junit.Assert;
6464
import org.junit.BeforeClass;
65-
import org.junit.Ignore;
6665
import org.junit.Test;
6766
import org.junit.runner.RunWith;
6867
import org.junit.runners.JUnit4;
@@ -157,7 +156,6 @@ private static void fillRequesterPaysFile(Storage storage, String fname, int siz
157156
}
158157

159158
// Start of tests related to the "requester pays" feature
160-
@Ignore("blocked by #3448")
161159
@Test
162160
public void testFileExistsRequesterPaysNoUserProject() throws IOException {
163161
CloudStorageFileSystem testBucket = getRequesterPaysBucket(false, "");
@@ -187,16 +185,15 @@ public void testFileExistsRequesterPaysWithAutodetect() throws IOException {
187185
Files.exists(path);
188186
}
189187

190-
@Ignore("blocked by #3448")
191188
@Test
192189
public void testCantCreateWithoutUserProject() throws IOException {
193190
CloudStorageFileSystem testBucket = getRequesterPaysBucket(false, "");
194-
Path path = testBucket.getPath(SML_FILE);
191+
Path path = testBucket.getPath(TMP_FILE);
195192
try {
196193
// fails
197194
Files.write(path, "I would like to write".getBytes());
198195
Assert.fail("It should have thrown an exception.");
199-
} catch (StorageException ex) {
196+
} catch (IOException ex) {
200197
assertIsRequesterPaysException("testCantCreateWithoutUserProject", ex);
201198
}
202199
}
@@ -209,7 +206,6 @@ public void testCanCreateWithUserProject() throws IOException {
209206
Files.write(path, "I would like to write, please?".getBytes());
210207
}
211208

212-
@Ignore("blocked by #3448")
213209
@Test
214210
public void testCantReadWithoutUserProject() throws IOException {
215211
CloudStorageFileSystem testBucket = getRequesterPaysBucket(false, "");
@@ -231,7 +227,6 @@ public void testCanReadWithUserProject() throws IOException {
231227
Files.readAllBytes(path);
232228
}
233229

234-
@Ignore("blocked by #3448")
235230
@Test
236231
public void testCantCopyWithoutUserProject() throws IOException {
237232
CloudStorageFileSystem testRPBucket = getRequesterPaysBucket(false, "");
@@ -324,6 +319,12 @@ private void assertIsRequesterPaysException(String message, StorageException ex)
324319
ex.getMessage().contains("Bucket is requester pays bucket but no user project provided"));
325320
}
326321

322+
private void assertIsRequesterPaysException(String message, IOException ioex) {
323+
Assert.assertTrue(message, ioex.getMessage().startsWith("400"));
324+
Assert.assertTrue(
325+
message,
326+
ioex.getMessage().contains("Bucket is requester pays bucket but no user project provided"));
327+
}
327328
// End of tests related to the "requester pays" feature
328329

329330
@Test

0 commit comments

Comments
 (0)