File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ import (
15
15
16
16
// Mock client that simply tracks if refresh has been called
17
17
type TestClient struct {
18
- refreshCount int32
18
+ refreshCount int
19
19
responses []nmagent.Interfaces
20
20
mu sync.Mutex
21
21
}
22
22
23
23
// FetchRefreshCount atomically fetches the refresh count
24
- func (c * TestClient ) FetchRefreshCount () int32 {
24
+ func (c * TestClient ) FetchRefreshCount () int {
25
25
c .mu .Lock ()
26
26
defer c .mu .Unlock ()
27
27
return c .refreshCount
@@ -38,7 +38,7 @@ func (c *TestClient) UpdateRefreshCount() {
38
38
func (c * TestClient ) GetInterfaceIPInfo (_ context.Context ) (nmagent.Interfaces , error ) {
39
39
defer c .UpdateRefreshCount ()
40
40
41
- if c .refreshCount >= int32 ( len (c .responses ) ) {
41
+ if c .refreshCount >= len (c .responses ) {
42
42
return c .responses [len (c .responses )- 1 ], nil
43
43
}
44
44
@@ -49,12 +49,12 @@ var _ nodesubnet.InterfaceRetriever = &TestClient{}
49
49
50
50
// Mock client that simply consumes fetched IPs
51
51
type TestConsumer struct {
52
- consumeCount int32
52
+ consumeCount int
53
53
mu sync.Mutex
54
54
}
55
55
56
56
// FetchConsumeCount atomically fetches the consume count
57
- func (c * TestConsumer ) FetchConsumeCount () int32 {
57
+ func (c * TestConsumer ) FetchConsumeCount () int {
58
58
c .mu .Lock ()
59
59
defer c .mu .Unlock ()
60
60
return c .consumeCount
You can’t perform that action at this time.
0 commit comments