Skip to content

Commit 99cea57

Browse files
committed
chore: add LICENSE and fix ineffectual assignment
1 parent dde0be1 commit 99cea57

2 files changed

Lines changed: 25 additions & 13 deletions

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 aqstack
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

pkg/consensus/raft_lite_test.go

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -424,21 +424,12 @@ func TestTwoNodeCommunication(t *testing.T) {
424424
// Wait for election to complete
425425
time.Sleep(500 * time.Millisecond)
426426

427-
// One should be leader
428-
leaders := 0
429-
if node1.IsLeader() {
430-
leaders++
431-
}
432-
if node2.IsLeader() {
433-
leaders++
434-
}
435-
436427
// In a 2-node cluster, we need both to agree on leader
437428
// This test is somewhat flaky due to timing, so just log
438-
t.Logf("Node1: state=%s, term=%d, leader=%s",
439-
node1.State(), node1.Term(), node1.LeaderID())
440-
t.Logf("Node2: state=%s, term=%d, leader=%s",
441-
node2.State(), node2.Term(), node2.LeaderID())
429+
t.Logf("Node1: state=%s, term=%d, leader=%s, isLeader=%v",
430+
node1.State(), node1.Term(), node1.LeaderID(), node1.IsLeader())
431+
t.Logf("Node2: state=%s, term=%d, leader=%s, isLeader=%v",
432+
node2.State(), node2.Term(), node2.LeaderID(), node2.IsLeader())
442433
}
443434

444435
func TestRateLimiterTokenBucket(t *testing.T) {

0 commit comments

Comments
 (0)