mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-04-10 22:03:14 +00:00
setting num-shards-in-network to 0 by default (#3748)
Co-authored-by: darshankabariya <darshan@status.im>
This commit is contained in:
parent
f5762af4c4
commit
59bd365c16
@ -23,9 +23,8 @@ import
|
||||
suite "Waku external config - default values":
|
||||
test "Default sharding value":
|
||||
## Setup
|
||||
let defaultShardingMode = AutoSharding
|
||||
let defaultNumShardsInCluster = 1.uint16
|
||||
let defaultSubscribeShards = @[0.uint16]
|
||||
let defaultShardingMode = StaticSharding
|
||||
let defaultSubscribeShards: seq[uint16] = @[]
|
||||
|
||||
## Given
|
||||
let preConfig = defaultWakuNodeConf().get()
|
||||
@ -37,7 +36,6 @@ suite "Waku external config - default values":
|
||||
## Then
|
||||
let conf = res.get()
|
||||
check conf.shardingConf.kind == defaultShardingMode
|
||||
check conf.shardingConf.numShardsInCluster == defaultNumShardsInCluster
|
||||
check conf.subscribeShards == defaultSubscribeShards
|
||||
|
||||
test "Default shards value in static sharding":
|
||||
@ -212,7 +210,7 @@ suite "Waku external config - Shards":
|
||||
let vRes = wakuConf.validate()
|
||||
assert vRes.isOk(), $vRes.error
|
||||
|
||||
test "Imvalid shard is passed without num shards":
|
||||
test "Any shard is valid without num shards in static sharding mode":
|
||||
## Setup
|
||||
|
||||
## Given
|
||||
@ -222,7 +220,9 @@ suite "Waku external config - Shards":
|
||||
let res = wakuNodeConf.toWakuConf()
|
||||
|
||||
## Then
|
||||
assert res.isErr(), "Invalid shard was accepted"
|
||||
let wakuConf = res.get()
|
||||
let vRes = wakuConf.validate()
|
||||
assert vRes.isOk(), $vRes.error
|
||||
|
||||
suite "Waku external config - store retention policy":
|
||||
test "Default retention policy":
|
||||
|
||||
@ -331,7 +331,7 @@ hence would have reachability issues.""",
|
||||
numShardsInNetwork* {.
|
||||
desc:
|
||||
"Enables autosharding and set number of shards in the cluster, set to `0` to use static sharding",
|
||||
defaultValue: 1,
|
||||
defaultValue: 0,
|
||||
name: "num-shards-in-network"
|
||||
.}: uint16
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user