Skip to content

Commit

Permalink
tests: raise similardirs tollerance to 5%
Browse files Browse the repository at this point in the history
  • Loading branch information
handymenny committed Nov 18, 2024
1 parent 7c5a1a0 commit f33830a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ object UtilityForTests {
.collect(Collectors.toList())
}

/** Check if the given directories have the same tree and if files have similar sizes (± 3%) */
/** Check if the given directories have the same tree and if files have similar sizes (± 5%) */
internal fun dirsSimilar(expected: String, actual: String): Boolean {
val pathA = Path(expected)
val pathB = Path(actual)
Expand Down Expand Up @@ -57,7 +57,7 @@ object UtilityForTests {
} else {
val aSize = fileA.readBytes().size
val bSize = fileB.readBytes().size
abs(aSize - bSize) < 3 * aSize / 100
abs(aSize - bSize) < 5 * aSize / 100
}
}
return result
Expand Down

0 comments on commit f33830a

Please sign in to comment.