Skip to content

Add a member_options option#33

Open
ihumanable wants to merge 1 commit into
whitfin:mainfrom
ihumanable:feature/configurable-node-options
Open

Add a member_options option#33
ihumanable wants to merge 1 commit into
whitfin:mainfrom
ihumanable:feature/configurable-node-options

Conversation

@ihumanable

@ihumanable ihumanable commented Mar 4, 2025

Copy link
Copy Markdown

Thanks for the lovely library!

Why

I have a testing scenario where I need to artificially generate partitions in the local cluster to test some functionality.

If I do this then global gets upset and tries to protect me from overlapping partitions. This is a great feature unless of course you are trying to write tests that test partitioning.

What

I can fix this in my tests by starting up the members with additional command line flags, specifically

-kernel prevent_overlapping_partitions false

How

I added an option :member_options that allows a caller to provide additional command line arguments. I'm using it like this

LocalCluster.child_spec(
  {amount, 
   member_options: ~w(-kernel prevent_overlapping_partitions false),
   prefix: prefix})

And this works perfectly for letting me run cluster tests where I need to partition the local cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant