diff --git a/components/rc_log/android/src/test/java/mozilla/appservices/rustlog/LogTest.kt b/components/rc_log/android/src/test/java/mozilla/appservices/rustlog/LogTest.kt index 35a6e121e..5ff953494 100644 --- a/components/rc_log/android/src/test/java/mozilla/appservices/rustlog/LogTest.kt +++ b/components/rc_log/android/src/test/java/mozilla/appservices/rustlog/LogTest.kt @@ -72,7 +72,7 @@ class LogTest { assertEquals(logs.size, 3) assert(!wasCalled) - for (i in 0..15) { + repeat(15) { Thread.sleep(10) @Suppress("ExplicitGarbageCollectionCall") System.gc() @@ -167,7 +167,7 @@ class LogTest { RustLogAdapter.disable() // Make sure the GC can now collect the background threads. - for (i in 0..15) { + repeat(15) { Thread.sleep(10) @Suppress("ExplicitGarbageCollectionCall") System.gc() diff --git a/components/support/nimbus-fml/test/threadsafe_feature_holder.kts b/components/support/nimbus-fml/test/threadsafe_feature_holder.kts index b33674135..1ed66a074 100644 --- a/components/support/nimbus-fml/test/threadsafe_feature_holder.kts +++ b/components/support/nimbus-fml/test/threadsafe_feature_holder.kts @@ -22,12 +22,12 @@ class Feature(val string: String): FMLFeatureInterface { val holder = FeatureHolder({ api }, featureId = "test-feature-holder") { Feature("NO CRASH") } -for (i in 0..10000) { +repeat(10000) { scope.submit { holder.value() } } -for (i in 0..2000) { +repeat(2000) { scope.submit { holder.value() }