Commit 193d973e authored by Anders Jensen Løvig's avatar Anders Jensen Løvig
Browse files

Logging

parent 46f31fa3
Pipeline #21897 failed with stages
in 2 minutes and 23 seconds
......@@ -200,7 +200,6 @@ func (election *Election) Start() error {
}
func (election *Election) nextPhase(reason Reason) {
log.Println("Election: next phase reason:", reason)
switch election.Status.Phase {
case PhaseNotStarted:
log.Println("==================== Collecting ====================")
......@@ -282,6 +281,7 @@ func (election *Election) nextPhase(reason Reason) {
return // No new phase
}
log.Println("Election: next phase reason:", reason)
log.Println("Election: new phase:", election.Status.Phase)
}
......
......@@ -415,6 +415,7 @@ func TestCloseTimeout(t *testing.T) {
func TestCloseTimeoutTally(t *testing.T) {
_ = testElection(t, PhaseTallying, func(e *Election) <-chan time.Time {
log.SetOutput(os.Stdout)
e.Status.Phase = PhaseCollect
e.Config.CloseSleep = 1 * time.Second
......@@ -463,7 +464,6 @@ func TestCloseTimeoutSkipTally(t *testing.T) {
func TestCloseTimeoutLateBallot(t *testing.T) {
_ = testElection(t, PhaseClosed, func(e *Election) <-chan time.Time {
log.SetOutput(os.Stdout)
e.Status.Phase = PhaseCollect
e.Config.CloseSleep = 500 * time.Millisecond
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment