Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and use interface for replicator #659

Merged
merged 1 commit into from
Apr 15, 2024
Merged

Add and use interface for replicator #659

merged 1 commit into from
Apr 15, 2024

Conversation

spuun
Copy link
Member

@spuun spuun commented Apr 10, 2024

WHAT is this pull request doing?

Adds interface Replicator which Replicator::Server implements. This will make it possible to stub/mock Replicator.

HOW can this pull request be tested?

Run specs

@spuun spuun merged commit e70396a into main Apr 15, 2024
26 of 27 checks passed
@spuun spuun deleted the replication-replicator branch April 15, 2024 19:03

module LavinMQ
module Replication
module Replicator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not an abstract class?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of being able to use multiple interfaces when applicable to reduce the interface you need to mock/stub in specs. Replication::Server now implements Replication::Replicator and Replication::FileIndex.

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.

4 participants