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 29, 2024
1 parent 459a43b commit 45ce49e
Show file tree
Hide file tree
Showing 4 changed files with 274 additions and 86 deletions.
24 changes: 14 additions & 10 deletions integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,22 @@ 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("polling checkpoint 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)
}

// Step 4 - Loop through the entry data index map to verify leaves and inclusion proofs.
entryIndexMap.Range(func(k, v any) bool {
Expand Down
Loading

0 comments on commit 45ce49e

Please sign in to comment.