Skip to content

Commit

Permalink
Fix with RuntimeSupport integ tests where Xunit attempts to run the t…
Browse files Browse the repository at this point in the history
…est from the base class and fails.
  • Loading branch information
normj committed Oct 12, 2023
1 parent de1d04e commit 7a4ceda
Showing 1 changed file with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ public CustomRuntimeNET6Tests()
: base("CustomRuntimeNET6FunctionTest-" + DateTime.Now.Ticks, "CustomRuntimeFunctionTest.zip", @"CustomRuntimeFunctionTest\bin\Release\net6.0\CustomRuntimeFunctionTest.zip", "CustomRuntimeFunctionTest", TargetFramework.NET6)
{
}

#if SKIP_RUNTIME_SUPPORT_INTEG_TESTS
[Fact(Skip = "Skipped intentionally by setting the SkipRuntimeSupportIntegTests build parameter.")]
#else
[Fact]
#endif
public async Task TestAllNET6HandlersAsync()
{
await base.TestAllHandlersAsync();
}
}

public class CustomRuntimeNET8Tests : CustomRuntimeTests
Expand All @@ -44,6 +54,16 @@ public CustomRuntimeNET8Tests()
: base("CustomRuntimeNET8FunctionTest-" + DateTime.Now.Ticks, "CustomRuntimeFunctionTest.zip", @"CustomRuntimeFunctionTest\bin\Release\net8.0\CustomRuntimeFunctionTest.zip", "CustomRuntimeFunctionTest", TargetFramework.NET8)
{
}

#if SKIP_RUNTIME_SUPPORT_INTEG_TESTS
[Fact(Skip = "Skipped intentionally by setting the SkipRuntimeSupportIntegTests build parameter.")]
#else
[Fact]
#endif
public async Task TestAllNET8HandlersAsync()
{
await base.TestAllHandlersAsync();
}
}

public class CustomRuntimeTests : BaseCustomRuntimeTest
Expand All @@ -58,12 +78,7 @@ public CustomRuntimeTests(string functionName, string deploymentZipKey, string d
_targetFramework = targetFramework;
}

#if SKIP_RUNTIME_SUPPORT_INTEG_TESTS
[Fact(Skip = "Skipped intentionally by setting the SkipRuntimeSupportIntegTests build parameter.")]
#else
[Fact]
#endif
public async Task TestAllHandlersAsync()
protected virtual async Task TestAllHandlersAsync()
{
// run all test cases in one test to ensure they run serially
using (var lambdaClient = new AmazonLambdaClient(TestRegion))
Expand Down

0 comments on commit 7a4ceda

Please sign in to comment.