mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-20 08:26:31 +00:00
linting: add to Makefile & do some fixes
This commit is contained in:
@ -55,6 +55,7 @@ func TestSmall(t *testing.T) {
|
||||
This test is quite hacky because it relies on SetFinalizer
|
||||
which isn't guaranteed to run at all.
|
||||
*/
|
||||
// nolint: megacheck
|
||||
func _TestGCFifo(t *testing.T) {
|
||||
|
||||
const numElements = 1000000
|
||||
@ -102,6 +103,7 @@ func _TestGCFifo(t *testing.T) {
|
||||
This test is quite hacky because it relies on SetFinalizer
|
||||
which isn't guaranteed to run at all.
|
||||
*/
|
||||
// nolint: megacheck
|
||||
func _TestGCRandom(t *testing.T) {
|
||||
|
||||
const numElements = 1000000
|
||||
@ -132,7 +134,7 @@ func _TestGCRandom(t *testing.T) {
|
||||
for _, i := range rand.Perm(numElements) {
|
||||
el := els[i]
|
||||
l.Remove(el)
|
||||
el = el.Next()
|
||||
_ = el.Next()
|
||||
}
|
||||
|
||||
runtime.GC()
|
||||
@ -153,7 +155,7 @@ func TestScanRightDeleteRandom(t *testing.T) {
|
||||
l := New()
|
||||
stop := make(chan struct{})
|
||||
|
||||
els := make([]*CElement, numElements, numElements)
|
||||
els := make([]*CElement, numElements)
|
||||
for i := 0; i < numElements; i++ {
|
||||
el := l.PushBack(i)
|
||||
els[i] = el
|
||||
|
Reference in New Issue
Block a user