Skip to content

Commit fadf7a7

Browse files
tokoubartekpacia
authored andcommitted
Rename broadcast to replicate
1 parent a329bb0 commit fadf7a7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

maestro-cli/src/main/java/maestro/cli/command/TestCommand.kt

+6-6
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ class TestCommand : Callable<Int> {
8787
private var shards: Int = 1
8888

8989
@Option(
90-
names = ["-b", "--broadcast"],
91-
description = ["Broadcasts all the tests across all running devices"]
90+
names = ["-r", "--replicate"],
91+
description = ["Replicates all the tests across all running devices"]
9292
)
93-
private var broadcast: Boolean = false
93+
private var replicate: Boolean = false
9494

9595
@Option(names = ["-c", "--continuous"])
9696
private var continuous: Boolean = false
@@ -201,11 +201,11 @@ class TestCommand : Callable<Int> {
201201
}.toMutableSet())
202202

203203
val availableDevices = if (deviceIds.isNotEmpty()) deviceIds.size else initialActiveDevices.size
204-
val effectiveShards = if (broadcast) availableDevices else shards.coerceAtMost(plan.flowsToRun.size)
204+
val effectiveShards = if (replicate) availableDevices else shards.coerceAtMost(plan.flowsToRun.size)
205205
val sharded = effectiveShards > 1
206206

207207
val chunkPlans =
208-
if (broadcast) (0 until availableDevices).map { ExecutionPlan(plan.flowsToRun, plan.sequence) }
208+
if (replicate) (0 until availableDevices).map { ExecutionPlan(plan.flowsToRun, plan.sequence) }
209209
else plan.flowsToRun
210210
.withIndex()
211211
.groupBy { it.index % effectiveShards }
@@ -221,7 +221,7 @@ class TestCommand : Callable<Int> {
221221

222222
// Collect device configurations for missing shards, if any
223223
val missing = effectiveShards - availableDevices
224-
val allDeviceConfigs = if (!broadcast) (0 until missing).map { shardIndex ->
224+
val allDeviceConfigs = if (!replicate) (0 until missing).map { shardIndex ->
225225
PrintUtils.message("------------------ Shard ${shardIndex + 1} ------------------")
226226
// Collect device configurations here, one per shard
227227
PickDeviceView.requestDeviceOptions()

0 commit comments

Comments
 (0)