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

tests: Add unit test for DS #756

Merged
merged 22 commits into from
Jan 2, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
maintainer: remove debug log
Signed-off-by: dongmen <414110582@qq.com>
asddongmen committed Dec 31, 2024
commit b40f717bc70c068eb28dc2ecf5e5c13ef029948c
1 change: 0 additions & 1 deletion maintainer/maintainer_manager.go
Original file line number Diff line number Diff line change
@@ -138,7 +138,6 @@ func (m *Manager) Run(ctx context.Context) error {
case <-ctx.Done():
return ctx.Err()
case msg := <-m.msgCh:
log.Info("fizz received message from coordinator", zap.Any("message", msg))
m.handleMessage(msg)
case <-ticker.C:
//1. try to send heartbeat to coordinator
3 changes: 0 additions & 3 deletions maintainer/maintainer_manager_test.go
Original file line number Diff line number Diff line change
@@ -150,16 +150,13 @@ func TestMaintainerSchedulesNodeChanges(t *testing.T) {

// Case 3: Remove 2 nodes
dn3.stop()
log.Info("fizz Stop node 3")
dn4.stop()
log.Info("fizz Stop node 4")
_, _ = nodeManager.Tick(ctx, &orchestrator.GlobalReactorState{
Captures: map[model.CaptureID]*model.CaptureInfo{
model.CaptureID(selfNode.ID): {ID: model.CaptureID(selfNode.ID), AdvertiseAddr: selfNode.AdvertiseAddr},
model.CaptureID(node2.ID): {ID: model.CaptureID(node2.ID), AdvertiseAddr: node2.AdvertiseAddr},
}})
time.Sleep(5 * time.Second)
log.Info("fizz Sleep 5 seconds done")
require.Equal(t, 4,
maintainer.controller.replicationDB.GetReplicatingSize())
require.Equal(t, 2,