File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
firebase-firestore/src/androidTest/java/com/google/firebase/firestore/testutil Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -128,10 +128,6 @@ public enum TargetBackend {
128128
129129 private static boolean backendPrimed = false ;
130130
131- private static final Random RANDOM = new Random ();
132-
133- private static final int MAX_BYTES_PER_FIELD_VALUE = 1048487 ;
134-
135131 // FirebaseOptions needed to create a test FirebaseApp.
136132 private static final FirebaseOptions OPTIONS =
137133 new FirebaseOptions .Builder ()
@@ -574,11 +570,14 @@ public static void checkOnlineAndOfflineResultsMatch(
574570 * be stored in a Firestore document.
575571 */
576572 public static Map <String , Object > getLargestDocContent () {
573+ int MAX_BYTES_PER_FIELD_VALUE = 1048487 ;
577574 // Subtract 8 for '__name__', 20 for its value, and 4 for 'blob'.
578575 int numBytesToUse = MAX_BYTES_PER_FIELD_VALUE - 8 - 20 - 4 ;
576+
579577 byte [] bytes = new byte [numBytesToUse ];
580578 // Fill the byte array with random values
581- RANDOM .nextBytes (bytes );
579+ Random random = new Random ();
580+ random .nextBytes (bytes );
582581 return Collections .singletonMap ("blob" , Blob .fromBytes (bytes ));
583582 }
584583}
You can’t perform that action at this time.
0 commit comments