perf: sync protocol and core hardening updates
This commit is contained in:
parent
152fed3b87
commit
4390ebf5a9
283 changed files with 29231 additions and 2295 deletions
|
|
@ -217,7 +217,7 @@ func TestDispatchOutboxLifecycleKeepsDurableEvents(t *testing.T) {
|
|||
if len(claimed) != 1 || claimed[0].TargetUserID != owner.ID || claimed[0].Pts != 1 || claimed[0].Attempts != 1 || claimed[0].ExcludeSessionID != 101 {
|
||||
t.Fatalf("claimed first = %+v, want owner pts=1 attempts=1", claimed)
|
||||
}
|
||||
if err := outbox.MarkDelivered(ctx, owner.ID, claimed[0].ID); err != nil {
|
||||
if err := outbox.MarkDelivered(ctx, claimed[0]); err != nil {
|
||||
t.Fatalf("MarkDelivered: %v", err)
|
||||
}
|
||||
if got := outboxRows(1); got != 0 {
|
||||
|
|
@ -246,7 +246,7 @@ func TestDispatchOutboxLifecycleKeepsDurableEvents(t *testing.T) {
|
|||
if len(claimed) != 1 || claimed[0].TargetUserID != owner.ID || claimed[0].Pts != 2 || claimed[0].Attempts != 2 {
|
||||
t.Fatalf("claimed stale = %+v, want owner pts=2 attempts=2", claimed)
|
||||
}
|
||||
if err := outbox.MarkFailed(ctx, owner.ID, claimed[0].ID, "temporary"); err != nil {
|
||||
if err := outbox.MarkFailed(ctx, claimed[0], "temporary"); err != nil {
|
||||
t.Fatalf("MarkFailed temporary: %v", err)
|
||||
}
|
||||
var status string
|
||||
|
|
@ -275,7 +275,8 @@ func TestDispatchOutboxLifecycleKeepsDurableEvents(t *testing.T) {
|
|||
`, owner.ID, claimed[0].ID); err != nil {
|
||||
t.Fatalf("prepare terminal failure: %v", err)
|
||||
}
|
||||
if err := outbox.MarkFailed(ctx, owner.ID, claimed[0].ID, "permanent"); err != nil {
|
||||
claimed[0].Attempts = 5
|
||||
if err := outbox.MarkFailed(ctx, claimed[0], "permanent"); err != nil {
|
||||
t.Fatalf("MarkFailed permanent: %v", err)
|
||||
}
|
||||
if err := tx.QueryRow(ctx, `
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue