feat: 实现公平捞瓶和领取租约
This commit is contained in:
@@ -165,6 +165,7 @@ describe("database authority constraints", () => {
|
||||
bottleId: bottle.id,
|
||||
pickerId: firstPicker.id,
|
||||
leaseTokenHash: "lease-a",
|
||||
leaseTokenCiphertext: Buffer.from("ciphertext-a"),
|
||||
expiresAt: new Date(Date.now() + 60_000),
|
||||
},
|
||||
});
|
||||
@@ -174,6 +175,7 @@ describe("database authority constraints", () => {
|
||||
bottleId: bottle.id,
|
||||
pickerId: secondPicker.id,
|
||||
leaseTokenHash: "lease-b",
|
||||
leaseTokenCiphertext: Buffer.from("ciphertext-b"),
|
||||
expiresAt: new Date(Date.now() + 60_000),
|
||||
},
|
||||
}),
|
||||
@@ -188,6 +190,7 @@ describe("database authority constraints", () => {
|
||||
bottleId: bottle.id,
|
||||
pickerId: secondPicker.id,
|
||||
leaseTokenHash: "lease-c",
|
||||
leaseTokenCiphertext: Buffer.from("ciphertext-c"),
|
||||
expiresAt: new Date(Date.now() + 60_000),
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user