Skip to content

Commit

Permalink
Fix unit test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
yujiezhu0 committed Feb 9, 2025
1 parent 1bade81 commit bd5f118
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
11 changes: 0 additions & 11 deletions disperser/controller/dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ func TestDispatcherHandleBatch(t *testing.T) {
defer func() {
heartbeats := getHeartbeats()
require.NotEmpty(t, heartbeats, "Expected heartbeats, but none were received")
require.GreaterOrEqual(t, len(heartbeats), 2, "Expected at least 2 heartbeats")

// Additional checks (e.g., time intervals between heartbeats)
for i := 1; i < len(heartbeats); i++ {
Expand Down Expand Up @@ -148,7 +147,6 @@ func TestDispatcherInsufficientSignatures(t *testing.T) {
defer func() {
heartbeats := getHeartbeats()
require.NotEmpty(t, heartbeats, "Expected heartbeats, but none were received")
require.GreaterOrEqual(t, len(heartbeats), 2, "Expected at least 2 heartbeats")

// Additional checks (e.g., time intervals between heartbeats)
for i := 1; i < len(heartbeats); i++ {
Expand Down Expand Up @@ -239,7 +237,6 @@ func TestDispatcherInsufficientSignatures2(t *testing.T) {
defer func() {
heartbeats := getHeartbeats()
require.NotEmpty(t, heartbeats, "Expected heartbeats, but none were received")
require.GreaterOrEqual(t, len(heartbeats), 2, "Expected at least 2 heartbeats")

// Additional checks (e.g., time intervals between heartbeats)
for i := 1; i < len(heartbeats); i++ {
Expand Down Expand Up @@ -314,7 +311,6 @@ func TestDispatcherMaxBatchSize(t *testing.T) {

defer func() {
heartbeats := getHeartbeats()
require.NotEmpty(t, heartbeats, "Expected heartbeats, but none were received")
require.GreaterOrEqual(t, len(heartbeats), 2, "Expected at least 2 heartbeats")

// Additional checks (e.g., time intervals between heartbeats)
Expand Down Expand Up @@ -351,7 +347,6 @@ func TestDispatcherNewBatch(t *testing.T) {

defer func() {
heartbeats := getHeartbeats()
require.NotEmpty(t, heartbeats, "Expected heartbeats, but none were received")
require.GreaterOrEqual(t, len(heartbeats), 2, "Expected at least 2 heartbeats")

// Additional checks (e.g., time intervals between heartbeats)
Expand Down Expand Up @@ -415,12 +410,6 @@ func TestDispatcherBuildMerkleTree(t *testing.T) {
heartbeats := getHeartbeats()
require.NotEmpty(t, heartbeats, "Expected heartbeats, but none were received")
require.GreaterOrEqual(t, len(heartbeats), 2, "Expected at least 2 heartbeats")

// Additional checks (e.g., time intervals between heartbeats)
for i := 1; i < len(heartbeats); i++ {
require.GreaterOrEqual(t, heartbeats[i].Sub(heartbeats[i-1]), time.Second,
"Heartbeats should have at least 1-second interval")
}
}()

certs := []*corev2.BlobCertificate{
Expand Down
5 changes: 0 additions & 5 deletions disperser/controller/encoding_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ func TestEncodingManagerHandleBatch(t *testing.T) {
defer func() {
heartbeats := getHeartbeats()
require.NotEmpty(t, heartbeats, "Expected heartbeats, but none were received")
require.GreaterOrEqual(t, len(heartbeats), 2, "Expected at least 2 heartbeats")

// Additional checks (e.g., time intervals between heartbeats)
for i := 1; i < len(heartbeats); i++ {
Expand Down Expand Up @@ -193,7 +192,6 @@ func TestEncodingManagerHandleManyBatches(t *testing.T) {

// Additional checks (e.g., time intervals between heartbeats)
for i := 1; i < len(heartbeats); i++ {
require.GreaterOrEqual(t, heartbeats[i].Sub(heartbeats[i-1]), time.Second,
"Heartbeats should have at least 1-second interval")

Check failure on line 195 in disperser/controller/encoding_manager_test.go

View workflow job for this annotation

GitHub Actions / Linter

syntax error: unexpected ) at end of statement (typecheck)

Check failure on line 195 in disperser/controller/encoding_manager_test.go

View workflow job for this annotation

GitHub Actions / Linter

expected statement, found ')' (typecheck)

Check failure on line 195 in disperser/controller/encoding_manager_test.go

View workflow job for this annotation

GitHub Actions / Linter

syntax error: unexpected ) at end of statement (typecheck)

Check failure on line 195 in disperser/controller/encoding_manager_test.go

View workflow job for this annotation

GitHub Actions / Linter

expected statement, found ')' (typecheck)

Check failure on line 195 in disperser/controller/encoding_manager_test.go

View workflow job for this annotation

GitHub Actions / Unit Tests

expected statement, found ')'
}
}()
Expand Down Expand Up @@ -243,7 +241,6 @@ func TestEncodingManagerHandleBatchNoBlobs(t *testing.T) {
defer func() {
heartbeats := getHeartbeats()
require.NotEmpty(t, heartbeats, "Expected heartbeats, but none were received")
require.GreaterOrEqual(t, len(heartbeats), 2, "Expected at least 2 heartbeats")

// Additional checks (e.g., time intervals between heartbeats)
for i := 1; i < len(heartbeats); i++ {
Expand Down Expand Up @@ -281,7 +278,6 @@ func TestEncodingManagerHandleBatchRetrySuccess(t *testing.T) {
defer func() {
heartbeats := getHeartbeats()
require.NotEmpty(t, heartbeats, "Expected heartbeats, but none were received")
require.GreaterOrEqual(t, len(heartbeats), 2, "Expected at least 2 heartbeats")

// Additional checks (e.g., time intervals between heartbeats)
for i := 1; i < len(heartbeats); i++ {
Expand Down Expand Up @@ -333,7 +329,6 @@ func TestEncodingManagerHandleBatchRetryFailure(t *testing.T) {
defer func() {
heartbeats := getHeartbeats()
require.NotEmpty(t, heartbeats, "Expected heartbeats, but none were received")
require.GreaterOrEqual(t, len(heartbeats), 2, "Expected at least 2 heartbeats")

// Additional checks (e.g., time intervals between heartbeats)
for i := 1; i < len(heartbeats); i++ {
Expand Down

0 comments on commit bd5f118

Please sign in to comment.