Skip to content

Commit

Permalink
fix lint issues, push lowerbound to 1/2s
Browse files Browse the repository at this point in the history
  • Loading branch information
yossigi committed Aug 27, 2023
1 parent e01ffe6 commit 20d3c2a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions agreement/credentialArrivalHistory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
)

func TestCredentialHistoryStore(t *testing.T) {

Check failure on line 26 in agreement/credentialArrivalHistory_test.go

View workflow job for this annotation

GitHub Actions / Lint Warnings

[Lint Warnings] agreement/credentialArrivalHistory_test.go#L26

lint: TestCredentialHistoryStore: Add missing partition call to top of test. To disable partitioning, add it as a comment: partitiontest.PartitionTest(t) (partitiontest)
Raw output
agreement/credentialArrivalHistory_test.go:26:1: lint: TestCredentialHistoryStore: Add missing partition call to top of test. To disable partitioning, add it as a comment: partitiontest.PartitionTest(t) (partitiontest)
func TestCredentialHistoryStore(t *testing.T) {
^
// partitiontest.PartitionTest(t)
size := 5
buffer := newCredentialArrivalHistory(size)
// last store call overwrites the first one
Expand All @@ -39,6 +40,7 @@ func TestCredentialHistoryStore(t *testing.T) {
}

func TestCredentialHistoryReset(t *testing.T) {

Check failure on line 42 in agreement/credentialArrivalHistory_test.go

View workflow job for this annotation

GitHub Actions / Lint Warnings

[Lint Warnings] agreement/credentialArrivalHistory_test.go#L42

lint: TestCredentialHistoryReset: Add missing partition call to top of test. To disable partitioning, add it as a comment: partitiontest.PartitionTest(t) (partitiontest)
Raw output
agreement/credentialArrivalHistory_test.go:42:1: lint: TestCredentialHistoryReset: Add missing partition call to top of test. To disable partitioning, add it as a comment: partitiontest.PartitionTest(t) (partitiontest)
func TestCredentialHistoryReset(t *testing.T) {
^
// partitiontest.PartitionTest(t)
size := 5
buffer := newCredentialArrivalHistory(size)
// last store call overwrites the first one
Expand All @@ -58,6 +60,7 @@ func TestCredentialHistoryReset(t *testing.T) {
}

func TestCredentialHistoryIsFull(t *testing.T) {

Check failure on line 62 in agreement/credentialArrivalHistory_test.go

View workflow job for this annotation

GitHub Actions / Lint Warnings

[Lint Warnings] agreement/credentialArrivalHistory_test.go#L62

lint: TestCredentialHistoryIsFull: Add missing partition call to top of test. To disable partitioning, add it as a comment: partitiontest.PartitionTest(t) (partitiontest)
Raw output
agreement/credentialArrivalHistory_test.go:62:1: lint: TestCredentialHistoryIsFull: Add missing partition call to top of test. To disable partitioning, add it as a comment: partitiontest.PartitionTest(t) (partitiontest)
func TestCredentialHistoryIsFull(t *testing.T) {
^
// partitiontest.PartitionTest(t)
var buffer *credentialArrivalHistory
require.False(t, buffer.isFull())

Expand All @@ -76,6 +79,7 @@ func TestCredentialHistoryIsFull(t *testing.T) {
}

func TestOrderStatistics(t *testing.T) {

Check failure on line 81 in agreement/credentialArrivalHistory_test.go

View workflow job for this annotation

GitHub Actions / Lint Warnings

[Lint Warnings] agreement/credentialArrivalHistory_test.go#L81

lint: TestOrderStatistics: Add missing partition call to top of test. To disable partitioning, add it as a comment: partitiontest.PartitionTest(t) (partitiontest)
Raw output
agreement/credentialArrivalHistory_test.go:81:1: lint: TestOrderStatistics: Add missing partition call to top of test. To disable partitioning, add it as a comment: partitiontest.PartitionTest(t) (partitiontest)
func TestOrderStatistics(t *testing.T) {
^
// partitiontest.PartitionTest(t)
size := 5
buffer := newCredentialArrivalHistory(size)
require.False(t, buffer.isFull())
Expand Down
2 changes: 1 addition & 1 deletion agreement/dynamicFilterTimeoutParams.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const dynamicFilterCredentialArrivalHistory int = 40

// DynamicFilterTimeoutLowerBound specifies a minimal duration that the
// filter timeout must meet.
const dynamicFilterTimeoutLowerBound time.Duration = 600 * time.Millisecond
const dynamicFilterTimeoutLowerBound time.Duration = 500 * time.Millisecond

// DynamicFilterTimeoutCredentialArrivalHistoryIdx specified which sample to use
// out of a sorted DynamicFilterCredentialArrivalHistory-sized array of time
Expand Down
2 changes: 2 additions & 0 deletions agreement/dynamicFilterTimeoutParams_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
)

func TestSampleIndexIsValid(t *testing.T) {

Check failure on line 26 in agreement/dynamicFilterTimeoutParams_test.go

View workflow job for this annotation

GitHub Actions / Lint Warnings

[Lint Warnings] agreement/dynamicFilterTimeoutParams_test.go#L26

lint: TestSampleIndexIsValid: Add missing partition call to top of test. To disable partitioning, add it as a comment: partitiontest.PartitionTest(t) (partitiontest)
Raw output
agreement/dynamicFilterTimeoutParams_test.go:26:1: lint: TestSampleIndexIsValid: Add missing partition call to top of test. To disable partitioning, add it as a comment: partitiontest.PartitionTest(t) (partitiontest)
func TestSampleIndexIsValid(t *testing.T) {
^
// partitiontest.PartitionTest(t)
require.GreaterOrEqual(t, dynamicFilterCredentialArrivalHistory, 0)
require.GreaterOrEqual(t, dynamicFilterTimeoutCredentialArrivalHistoryIdx, 0)
if dynamicFilterCredentialArrivalHistory > 0 {
Expand All @@ -32,5 +33,6 @@ func TestSampleIndexIsValid(t *testing.T) {
}

func TestLowerBound(t *testing.T) {

Check failure on line 35 in agreement/dynamicFilterTimeoutParams_test.go

View workflow job for this annotation

GitHub Actions / Lint Warnings

[Lint Warnings] agreement/dynamicFilterTimeoutParams_test.go#L35

lint: TestLowerBound: Add missing partition call to top of test. To disable partitioning, add it as a comment: partitiontest.PartitionTest(t) (partitiontest)
Raw output
agreement/dynamicFilterTimeoutParams_test.go:35:1: lint: TestLowerBound: Add missing partition call to top of test. To disable partitioning, add it as a comment: partitiontest.PartitionTest(t) (partitiontest)
func TestLowerBound(t *testing.T) {
^
// partitiontest.PartitionTest(t)
require.Less(t, 20*time.Millisecond, dynamicFilterTimeoutLowerBound)
}

0 comments on commit 20d3c2a

Please sign in to comment.