Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChewingGlass committed Feb 19, 2025
1 parent d9cd1a3 commit a1f2727
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ pub struct InitializeTuktukConfigArgsV0 {
}

#[derive(Accounts)]
pub struct InitializeTuktukConfigV0<'info> {
pub struct InitializeTuktukConfigV0<'i
nfo> {
#[account(mut)]
pub payer: Signer<'info>,
#[account(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,11 @@ pub fn handler<'info>(
processor.process_instruction(ix, remaining_accounts)?;
}
} else {
msg!("Task is stale, closing task");
msg!(
"Task is stale with run time {:?}, current time {:?}, closing task",
task_time,
now
);
}

msg!(
Expand Down
4 changes: 2 additions & 2 deletions solana-programs/tests/cron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ describe("cron", () => {
minCrankReward: crankReward,
capacity: 100,
lookupTables: [],
staleTaskAge: 10000,
})
.accounts({
tuktukConfig,
Expand Down Expand Up @@ -223,6 +224,7 @@ describe("cron", () => {
);

await tx.sign([crankTurner]);

await sendAndConfirmWithRetry(
provider.connection,
Buffer.from(tx.serialize()),
Expand All @@ -249,7 +251,6 @@ describe("cron", () => {
task: task3,
crankTurner: crankTurner.publicKey,
});

const tx2 = toVersionedTx(
await populateMissingDraftInfo(provider.connection, {
feePayer: crankTurner.publicKey,
Expand All @@ -260,7 +261,6 @@ describe("cron", () => {
})
})
);

await tx2.sign([crankTurner]);
console.log(await sendAndConfirmWithRetry(
provider.connection,
Expand Down
2 changes: 2 additions & 0 deletions solana-programs/tests/tuktuk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ describe("tuktuk", () => {
minCrankReward: crankReward,
capacity: 100,
lookupTables: [],
staleTaskAge: 100,
})
.accounts({
tuktukConfig,
Expand Down Expand Up @@ -424,6 +425,7 @@ describe("tuktuk", () => {
minCrankReward: new anchor.BN(10),
capacity: 100,
lookupTables: [],
staleTaskAge: 100,
})
.accounts({
tuktukConfig,
Expand Down

0 comments on commit a1f2727

Please sign in to comment.