Skip to content

Commit

Permalink
rmv dup
Browse files Browse the repository at this point in the history
  • Loading branch information
kunkka19xx committed Dec 31, 2024
1 parent 06e0cad commit cdc6462
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions esdb/read_all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"os"
"os"
"testing"
"time"

Expand Down Expand Up @@ -44,15 +43,13 @@ func readAllEventsForwardsFromZeroPosition(db *esdb.Client) TestCall {
ResolveLinkTos: true,
}
stream, err := db.ReadAll(context, opts, numberOfEvents)

if err != nil {
t.Fatalf("Unexpected failure %+v", err)
}

defer stream.Close()

events, err := collectStreamEvents(stream)

if err != nil {
t.Fatalf("Unexpected failure %+v", err)
}
Expand Down Expand Up @@ -92,15 +89,13 @@ func readAllEventsForwardsFromNonZeroPosition(db *esdb.Client) TestCall {
}

stream, err := db.ReadAll(context, opts, numberOfEvents)

if err != nil {
t.Fatalf("Unexpected failure %+v", err)
}

defer stream.Close()

events, err := collectStreamEvents(stream)

if err != nil {
t.Fatalf("Unexpected failure %+v", err)
}
Expand Down Expand Up @@ -142,15 +137,13 @@ func readAllEventsBackwardsFromZeroPosition(db *esdb.Client) TestCall {

// We read 30 more events in case the DB had pushed more config related events before the test begins.
stream, err := db.ReadAll(context, opts, numberOfEvents+30)

if err != nil {
t.Fatalf("Unexpected failure %+v", err)
}

defer stream.Close()

events, err := collectStreamEvents(stream)

if err != nil {
t.Fatalf("Unexpected failure %+v", err)
}
Expand Down Expand Up @@ -203,15 +196,13 @@ func readAllEventsBackwardsFromNonZeroPosition(db *esdb.Client) TestCall {
}

stream, err := db.ReadAll(context, opts, numberOfEvents)

if err != nil {
t.Fatalf("Unexpected failure %+v", err)
}

defer stream.Close()

events, err := collectStreamEvents(stream)

if err != nil {
t.Fatalf("Unexpected failure %+v", err)
}
Expand Down Expand Up @@ -258,7 +249,6 @@ func readAllEventsWithCredentialOverride(db *esdb.Client) TestCall {
}

stream, err := db.ReadAll(context, opts, numberOfEvents)

if err != nil {
t.Fatalf("Unexpected failure %+v", err)
}
Expand All @@ -267,7 +257,6 @@ func readAllEventsWithCredentialOverride(db *esdb.Client) TestCall {

// collect all events to see if no error occurs
_, err = collectStreamEvents(stream)

if err != nil {
t.Fatalf("Unexpected failure %+v", err)
}
Expand Down

0 comments on commit cdc6462

Please sign in to comment.