Skip to content

Commit

Permalink
Adjust wrong unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
chopin-fan committed Jul 20, 2024
1 parent 69835d9 commit dc5ea6e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions test/AElf.CSharp.CodeOps.Tests/ContractAuditorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,8 @@ public void AuditTimeout()
Should.NotThrow(() => _auditor.Audit(ReadPatchedContractCode(typeof(TokenContract)), true));
var codeOpsOptions = GetRequiredService<IOptionsMonitor<CSharpCodeOpsOptions>>();
codeOpsOptions.CurrentValue.AuditTimeoutDuration = 0;
var exception =
Assert.Throws<AggregateException>(
() => _auditor.Audit(ReadPatchedContractCode(typeof(TokenContract)), true));
foreach (var ex in exception.InnerExceptions)
{
ex.GetType().ShouldBe(typeof(ContractAuditTimeoutException));
}
Should.Throw<ContractAuditTimeoutException>(() =>
_auditor.Audit(ReadPatchedContractCode(typeof(TokenContract)), true));
}

[Fact]
Expand Down

0 comments on commit dc5ea6e

Please sign in to comment.