Skip to content

Commit

Permalink
fix deepsource
Browse files Browse the repository at this point in the history
Signed-off-by: kevindiu <kevindiujp@gmail.com>
  • Loading branch information
kevindiu committed Nov 22, 2022
1 parent 9e11d1f commit 08454ea
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 81 deletions.
1 change: 0 additions & 1 deletion pkg/manager/index/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ func TestNewConfig(t *testing.T) {
if err := checkFunc(test.want, gotCfg, err); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
2 changes: 0 additions & 2 deletions pkg/manager/index/handler/grpc/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ func TestNew(t *testing.T) {
if err := checkFunc(test.want, got); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
Expand Down Expand Up @@ -220,7 +219,6 @@ func Test_server_IndexInfo(t *testing.T) {
if err := checkFunc(test.want, gotRes, err); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
1 change: 0 additions & 1 deletion pkg/manager/index/handler/grpc/option_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ func TestWithIndexer(t *testing.T) {
if err := checkFunc(test.want, got); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
3 changes: 0 additions & 3 deletions pkg/manager/index/handler/rest/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ func TestNew(t *testing.T) {
if err := checkFunc(test.want, got); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
Expand Down Expand Up @@ -214,7 +213,6 @@ func Test_handler_Index(t *testing.T) {
if err := checkFunc(test.want, got, err); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
Expand Down Expand Up @@ -320,7 +318,6 @@ func Test_handler_IndexInfo(t *testing.T) {
if err := checkFunc(test.want, gotCode, err); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
1 change: 0 additions & 1 deletion pkg/manager/index/handler/rest/option_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ func TestWithIndexer(t *testing.T) {
if err := checkFunc(test.want, got); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
2 changes: 0 additions & 2 deletions pkg/manager/index/router/option_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ func TestWithHandler(t *testing.T) {
if err := checkFunc(test.want, got); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
Expand Down Expand Up @@ -193,7 +192,6 @@ func TestWithTimeout(t *testing.T) {
if err := checkFunc(test.want, got); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
1 change: 0 additions & 1 deletion pkg/manager/index/router/router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ func TestNew(t *testing.T) {
if err := checkFunc(test.want, got); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
38 changes: 15 additions & 23 deletions pkg/manager/index/service/indexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ func TestNew(t *testing.T) {
if err := checkFunc(test.want, gotIdx, err); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
Expand All @@ -136,7 +135,7 @@ func Test_index_Start(t *testing.T) {
saveIndexTargetAddrCh chan string
schMap sync.Map
concurrency int
indexInfos indexInfos
indexInfos func() indexInfos
indexing atomic.Value
minUncommitted uint32
uuidsCount uint32
Expand Down Expand Up @@ -264,7 +263,7 @@ func Test_index_Start(t *testing.T) {
saveIndexTargetAddrCh: test.fields.saveIndexTargetAddrCh,
schMap: test.fields.schMap,
concurrency: test.fields.concurrency,
indexInfos: test.fields.indexInfos,
indexInfos: test.fields.indexInfos(),
indexing: test.fields.indexing,
minUncommitted: test.fields.minUncommitted,
uuidsCount: test.fields.uuidsCount,
Expand All @@ -275,7 +274,6 @@ func Test_index_Start(t *testing.T) {
if err := checkFunc(test.want, got, err); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
Expand All @@ -297,7 +295,7 @@ func Test_index_execute(t *testing.T) {
saveIndexTargetAddrCh chan string
schMap sync.Map
concurrency int
indexInfos indexInfos
indexInfos func() indexInfos
indexing atomic.Value
minUncommitted uint32
uuidsCount uint32
Expand Down Expand Up @@ -425,7 +423,7 @@ func Test_index_execute(t *testing.T) {
saveIndexTargetAddrCh: test.fields.saveIndexTargetAddrCh,
schMap: test.fields.schMap,
concurrency: test.fields.concurrency,
indexInfos: test.fields.indexInfos,
indexInfos: test.fields.indexInfos(),
indexing: test.fields.indexing,
minUncommitted: test.fields.minUncommitted,
uuidsCount: test.fields.uuidsCount,
Expand All @@ -436,7 +434,6 @@ func Test_index_execute(t *testing.T) {
if err := checkFunc(test.want, err); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
Expand All @@ -456,14 +453,13 @@ func Test_index_waitForNextSaving(t *testing.T) {
saveIndexTargetAddrCh chan string
schMap sync.Map
concurrency int
indexInfos indexInfos
indexInfos func() indexInfos
indexing atomic.Value
minUncommitted uint32
uuidsCount uint32
uncommittedUUIDsCount uint32
}
type want struct {
}
type want struct{}
type test struct {
name string
args args
Expand Down Expand Up @@ -576,7 +572,7 @@ func Test_index_waitForNextSaving(t *testing.T) {
saveIndexTargetAddrCh: test.fields.saveIndexTargetAddrCh,
schMap: test.fields.schMap,
concurrency: test.fields.concurrency,
indexInfos: test.fields.indexInfos,
indexInfos: test.fields.indexInfos(),
indexing: test.fields.indexing,
minUncommitted: test.fields.minUncommitted,
uuidsCount: test.fields.uuidsCount,
Expand Down Expand Up @@ -606,7 +602,7 @@ func Test_index_loadInfos(t *testing.T) {
saveIndexTargetAddrCh chan string
schMap sync.Map
concurrency int
indexInfos indexInfos
indexInfos func() indexInfos
indexing atomic.Value
minUncommitted uint32
uuidsCount uint32
Expand Down Expand Up @@ -730,7 +726,7 @@ func Test_index_loadInfos(t *testing.T) {
saveIndexTargetAddrCh: test.fields.saveIndexTargetAddrCh,
schMap: test.fields.schMap,
concurrency: test.fields.concurrency,
indexInfos: test.fields.indexInfos,
indexInfos: test.fields.indexInfos(),
indexing: test.fields.indexing,
minUncommitted: test.fields.minUncommitted,
uuidsCount: test.fields.uuidsCount,
Expand All @@ -741,7 +737,6 @@ func Test_index_loadInfos(t *testing.T) {
if err := checkFunc(test.want, err); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
Expand All @@ -758,7 +753,7 @@ func Test_index_IsIndexing(t *testing.T) {
saveIndexTargetAddrCh chan string
schMap sync.Map
concurrency int
indexInfos indexInfos
indexInfos func() indexInfos
indexing atomic.Value
minUncommitted uint32
uuidsCount uint32
Expand Down Expand Up @@ -875,7 +870,7 @@ func Test_index_IsIndexing(t *testing.T) {
saveIndexTargetAddrCh: test.fields.saveIndexTargetAddrCh,
schMap: test.fields.schMap,
concurrency: test.fields.concurrency,
indexInfos: test.fields.indexInfos,
indexInfos: test.fields.indexInfos(),
indexing: test.fields.indexing,
minUncommitted: test.fields.minUncommitted,
uuidsCount: test.fields.uuidsCount,
Expand All @@ -886,7 +881,6 @@ func Test_index_IsIndexing(t *testing.T) {
if err := checkFunc(test.want, got); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
Expand All @@ -903,7 +897,7 @@ func Test_index_NumberOfUUIDs(t *testing.T) {
saveIndexTargetAddrCh chan string
schMap sync.Map
concurrency int
indexInfos indexInfos
indexInfos func() indexInfos
indexing atomic.Value
minUncommitted uint32
uuidsCount uint32
Expand Down Expand Up @@ -1020,7 +1014,7 @@ func Test_index_NumberOfUUIDs(t *testing.T) {
saveIndexTargetAddrCh: test.fields.saveIndexTargetAddrCh,
schMap: test.fields.schMap,
concurrency: test.fields.concurrency,
indexInfos: test.fields.indexInfos,
indexInfos: test.fields.indexInfos(),
indexing: test.fields.indexing,
minUncommitted: test.fields.minUncommitted,
uuidsCount: test.fields.uuidsCount,
Expand All @@ -1031,7 +1025,6 @@ func Test_index_NumberOfUUIDs(t *testing.T) {
if err := checkFunc(test.want, got); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
Expand All @@ -1048,7 +1041,7 @@ func Test_index_NumberOfUncommittedUUIDs(t *testing.T) {
saveIndexTargetAddrCh chan string
schMap sync.Map
concurrency int
indexInfos indexInfos
indexInfos func() indexInfos
indexing atomic.Value
minUncommitted uint32
uuidsCount uint32
Expand Down Expand Up @@ -1165,7 +1158,7 @@ func Test_index_NumberOfUncommittedUUIDs(t *testing.T) {
saveIndexTargetAddrCh: test.fields.saveIndexTargetAddrCh,
schMap: test.fields.schMap,
concurrency: test.fields.concurrency,
indexInfos: test.fields.indexInfos,
indexInfos: test.fields.indexInfos(),
indexing: test.fields.indexing,
minUncommitted: test.fields.minUncommitted,
uuidsCount: test.fields.uuidsCount,
Expand All @@ -1176,7 +1169,6 @@ func Test_index_NumberOfUncommittedUUIDs(t *testing.T) {
if err := checkFunc(test.want, got); err != nil {
tt.Errorf("error = %v", err)
}

})
}
}
Loading

0 comments on commit 08454ea

Please sign in to comment.