Skip to content

Commit

Permalink
Make tests run faster
Browse files Browse the repository at this point in the history
  • Loading branch information
kpgalligan committed Aug 19, 2024
1 parent 1a3d256 commit 6c02de4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class SharedHashMapTest {
val m = SharedHashMap<String, MapData>()

val random = Random
for (i in 0 until 1_000) {
for (i in 0 until 500) {
val rand = random.nextInt()
assertEquals(m.rehash(rand), m.rehash(rand))
}
Expand All @@ -145,7 +145,7 @@ class SharedHashMapTest {
fun mtAddRemove() {
try {
println("mtAddRemove Start")
val LOOPS = 1_000
val LOOPS = 500
val ops = ThreadOperations { SharedHashMap<String, MapData>() }
val removeOps = ThreadOperations { SharedHashMap<String, MapData>() }
val m = SharedHashMap<String, MapData>()
Expand Down Expand Up @@ -179,7 +179,7 @@ class SharedHashMapTest {
val ops = ThreadOperations { }
val removeOps = ThreadOperations { }

val LOOPS = 2_000
val LOOPS = 500
for (i in 0 until LOOPS) {
val key = "key $i"
ops.exe { map.put(BadHashKey(key), MapData("val $i")) }
Expand Down

0 comments on commit 6c02de4

Please sign in to comment.