Skip to content

Commit

Permalink
Separate sequencing and integration for MySQL storage
Browse files Browse the repository at this point in the history
  • Loading branch information
roger2hk committed Oct 25, 2024
1 parent 0c3daf4 commit c933ae1
Show file tree
Hide file tree
Showing 4 changed files with 281 additions and 83 deletions.
22 changes: 14 additions & 8 deletions integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,21 @@ func TestLiveLogIntegration(t *testing.T) {
}

// Step 3 - Validate checkpoint size increment.
checkpoint, _, _, err = client.FetchCheckpoint(ctx, logRead, noteVerifier, noteVerifier.Name())
if err != nil {
t.Errorf("client.FetchCheckpoint: %v", err)
}
if checkpoint == nil {
t.Fatal("checkpoint not found")
var gotIncrease uint64
for gotIncrease != uint64(*testEntrySize) {
checkpoint, _, _, err = client.FetchCheckpoint(ctx, logRead, noteVerifier, noteVerifier.Name())
if err != nil {
t.Errorf("client.FetchCheckpoint: %v", err)
}
if checkpoint == nil {
t.Fatal("checkpoint not found")
}
t.Logf("checkpoint final size: %d", checkpoint.Size)
gotIncrease = checkpoint.Size - checkpointInitSize

time.Sleep(100 * time.Millisecond)
}
t.Logf("checkpoint final size: %d", checkpoint.Size)
gotIncrease := checkpoint.Size - checkpointInitSize

if gotIncrease != uint64(*testEntrySize) {
t.Errorf("checkpoint size increase got: %d, want: %d", gotIncrease, *testEntrySize)
}
Expand Down
Loading

0 comments on commit c933ae1

Please sign in to comment.