Skip to content

Commit 62b366a

Browse files
Copybara Storage: Fix Storage Lint (#504)
1 parent fab40e2 commit 62b366a

File tree

6 files changed

+11
-2
lines changed

6 files changed

+11
-2
lines changed

firebase-storage/src/androidTest/java/com/google/firebase/storage/IntegrationTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import org.junit.Test;
3838
import org.junit.runner.RunWith;
3939

40+
/** Integration tests for {@link FirebaseStorage}. */
4041
@RunWith(AndroidJUnit4.class)
4142
public class IntegrationTest {
4243
@Rule

firebase-storage/src/test/java/com/google/firebase/storage/ListTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.robolectric.RobolectricTestRunner;
3333
import org.robolectric.annotation.Config;
3434

35+
/** Tests for {@link FirebaseStorage}. */
3536
@RunWith(RobolectricTestRunner.class)
3637
@Config(sdk = Build.VERSION_CODES.LOLLIPOP_MR1)
3738
public class ListTest {
@@ -62,18 +63,21 @@ public void validateListOptions() {
6263
reference.list(-1);
6364
fail();
6465
} catch (IllegalArgumentException e) {
66+
// Expected.
6567
}
6668

6769
try {
6870
reference.list(1001);
6971
fail();
7072
} catch (IllegalArgumentException e) {
73+
// Expected.
7174
}
7275

7376
try {
7477
reference.list(1000, null);
7578
fail();
7679
} catch (IllegalArgumentException e) {
80+
// Expected.
7781
}
7882
}
7983

firebase-storage/src/test/java/com/google/firebase/storage/RetryRule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import org.junit.runner.Description;
1919
import org.junit.runners.model.Statement;
2020

21+
/** Retries tests that fail due to the test harnesses' unpredictable threading behavior. */
2122
public class RetryRule implements TestRule {
2223
private int retryCount;
2324

firebase-storage/src/test/java/com/google/firebase/storage/network/NetworkLayerMock.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
package com.google.firebase.storage.network;
1616

17+
/** Installs the Network Mock used by the unit tests. */
1718
public class NetworkLayerMock {
1819
public static MockConnectionFactory ensureNetworkMock(String testName, boolean isBinary) {
1920
MockConnectionFactory mockConnectionFactory = new MockConnectionFactory(testName, isBinary);

firebase-storage/src/testUtil/java/com/google/firebase/storage/TestDownloadHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ private static void verifyTaskCount(StorageReference reference, int expectedTask
272272
StorageTaskManager.getInstance().getDownloadTasksUnder(reference.getParent());
273273
Preconditions.checkState(
274274
downloadTasksAtParent.size() == expectedTasks,
275-
"Expected active download task at location %s to contain %s item(s), but contained %s item(s)",
275+
"Expected active download task at location %s to contain %s item(s), "
276+
+ "but contained %s item(s)",
276277
reference.getParent(),
277278
downloadTasksAtParent.size());
278279
}

firebase-storage/src/testUtil/java/com/google/firebase/storage/TestUploadHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,8 @@ private static void verifyTaskCount(StorageReference reference, int expectedTask
694694
StorageTaskManager.getInstance().getUploadTasksUnder(reference.getParent());
695695
Preconditions.checkState(
696696
uploadTasksAtParent.size() == expectedTasks,
697-
"Expected active upload task at location %s to contain %s item(s), but contained %s item(s)",
697+
"Expected active upload task at location %s to contain %s item(s), "
698+
+ "but contained %s item(s)",
698699
reference.getParent(),
699700
uploadTasksAtParent.size());
700701
}

0 commit comments

Comments
 (0)