Skip to content

Commit

Permalink
add test that should be active when esdb eventstore have global event…
Browse files Browse the repository at this point in the history
…s on each stream
  • Loading branch information
hallgrenx committed Jan 12, 2022
1 parent b8193d0 commit 3b3a40d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions eventstore/suite/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,25 @@ func saveReturnGlobalEventOrder(es eventsourcing.EventStore) error {
}
return nil
}

/* re-activate when esdb eventstore have global event order on each stream
func setGlobalVersionOnSavedEvents(es eventsourcing.EventStore) error {
events := testEvents()
err := es.Save(events)
if err != nil {
return err
}
eventsGet, err := es.Get(events[0].AggregateID, events[0].AggregateType, 0)
if err != nil {
return err
}
var g eventsourcing.Version
for _, e := range eventsGet {
g++
if e.GlobalVersion != g {
return fmt.Errorf("expected global version to be in sequens exp: %d, was: %d", g, e.GlobalVersion)
}
}
return nil
}
*/

0 comments on commit 3b3a40d

Please sign in to comment.