def partitionTestClassNames(classNames, buckets) { | |
def subArrays = [] | |
def bucketSize = classNames.size() / buckets | |
for (int i = 0; i < buckets; i++) { | |
def start = i * bucketSize | |
def end = i == buckets - 1 ? classNames.size() : start + bucketSize | |
subArrays += [classNames[start..<end]] | |
} | |
return subArrays | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment