Skip to content

Commit f43f62e

Browse files
committed
More test work
1 parent c6c4ab0 commit f43f62e

8 files changed

Lines changed: 19 additions & 18 deletions

File tree

Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="..\..\..\buildtools\common.props" />
44

55
<PropertyGroup>
6-
<TargetFrameworks>net8.0;net9.0;net10.0;net11.0</TargetFrameworks>
6+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
77
<Version>1.14.3</Version>
88
<Description>Provides a bootstrap and Lambda Runtime API Client to help you to develop custom .NET Core Lambda Runtimes.</Description>
99
<AssemblyTitle>Amazon.Lambda.RuntimeSupport</AssemblyTitle>

Libraries/src/SnapshotRestore.Registry/SnapshotRestore.Registry.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="..\..\..\buildtools\common.props" />
44

55
<PropertyGroup>
6-
<TargetFrameworks>net8.0;net9.0;net10.0;net11.0</TargetFrameworks>
6+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
77
<Version>1.0.1</Version>
88
<Description>Provides a Restore Hooks library to help you register before snapshot and after restore hooks.</Description>
99
<AssemblyTitle>SnapshotRestore.Registry</AssemblyTitle>

Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/HandlerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
namespace Amazon.Lambda.RuntimeSupport.UnitTests
3333
{
34-
[Collection("ResponseStreamFactory")]
34+
[Collection("RuntimeSupportStateCheck")]
3535
public class HandlerTests
3636
{
3737
private const string AggregateExceptionTestMarker = "AggregateExceptionTesting";

Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/HandlerWrapperTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
namespace Amazon.Lambda.RuntimeSupport.UnitTests
2525
{
26+
[Collection("RuntimeSupportStateCheck")]
2627
public class HandlerWrapperTests
2728
{
2829
private static readonly JsonSerializer Serializer = new JsonSerializer();

Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/LambdaBootstrapTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace Amazon.Lambda.RuntimeSupport.UnitTests
3131
/// Tests to test LambdaBootstrap when it's constructed using its actual constructor.
3232
/// Tests of the static GetLambdaBootstrap methods can be found in LambdaBootstrapWrapperTests.
3333
/// </summary>
34-
[Collection("ResponseStreamFactory")]
34+
[Collection("RuntimeSupportStateCheck")]
3535
public class LambdaBootstrapTests
3636
{
3737
readonly TestHandler _testFunction;

Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/LambdaResponseStreamingCoreTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ public void Dispose_DisposesInnerStream()
398398
// LambdaResponseStreamFactory tests
399399
// ─────────────────────────────────────────────────────────────────────────────
400400

401-
[Collection("ResponseStreamFactory")]
401+
[Collection("RuntimeSupportStateCheck")]
402402
public class LambdaResponseStreamFactoryTests : IDisposable
403403
{
404404

Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/ResponseStreamFactoryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
namespace Amazon.Lambda.RuntimeSupport.UnitTests
2323
{
24-
[Collection("ResponseStreamFactory")]
24+
[Collection("RuntimeSupportStateCheck")]
2525
public class ResponseStreamFactoryTests : IDisposable
2626
{
2727
private const long MaxResponseSize = 20 * 1024 * 1024;

Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.UnitTests/StreamingE2EWithMoq.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626

2727
namespace Amazon.Lambda.RuntimeSupport.UnitTests
2828
{
29-
[CollectionDefinition("ResponseStreamFactory")]
30-
public class ResponseStreamFactoryCollection { }
29+
[CollectionDefinition("RuntimeSupportStateCheck")]
30+
public class RuntimeSupportStateCheckCollection { }
3131

3232
/// <summary>
3333
/// End-to-end integration tests for the true-streaming architecture.
3434
/// These tests exercise the full pipeline: LambdaBootstrap → ResponseStreamFactory →
3535
/// ResponseStream → captured HTTP output stream.
3636
/// </summary>
37-
[Collection("ResponseStreamFactory")]
37+
[Collection("RuntimeSupportStateCheck")]
3838
public class StreamingE2EWithMoq : IDisposable
3939
{
4040
public void Dispose()
@@ -162,7 +162,7 @@ public async Task Streaming_AllDataTransmitted_ContentRoundTrip()
162162
return new InvocationResponse(Stream.Null, false);
163163
};
164164

165-
using var bootstrap = new LambdaBootstrap(handler, null);
165+
using var bootstrap = new LambdaBootstrap(handler, null, null, new TestEnvironmentVariables());
166166
bootstrap.Client = client;
167167
await bootstrap.InvokeOnceAsync();
168168

@@ -189,7 +189,7 @@ public async Task Streaming_StreamFinalized_BytesWrittenMatchesPayload()
189189
return new InvocationResponse(Stream.Null, false);
190190
};
191191

192-
using var bootstrap = new LambdaBootstrap(handler, null);
192+
using var bootstrap = new LambdaBootstrap(handler, null, null, new TestEnvironmentVariables());
193193
bootstrap.Client = client;
194194
await bootstrap.InvokeOnceAsync();
195195

@@ -213,7 +213,7 @@ public async Task Buffered_HandlerDoesNotCallCreateStream_UsesSendResponsePath()
213213
return new InvocationResponse(new MemoryStream(responseBody));
214214
};
215215

216-
using var bootstrap = new LambdaBootstrap(handler, null);
216+
using var bootstrap = new LambdaBootstrap(handler, null, null, new TestEnvironmentVariables());
217217
bootstrap.Client = client;
218218
await bootstrap.InvokeOnceAsync();
219219

@@ -237,7 +237,7 @@ public async Task Buffered_ResponseBodyTransmittedCorrectly()
237237
return new InvocationResponse(new MemoryStream(responseBody));
238238
};
239239

240-
using var bootstrap = new LambdaBootstrap(handler, null);
240+
using var bootstrap = new LambdaBootstrap(handler, null, null, new TestEnvironmentVariables());
241241
bootstrap.Client = client;
242242
await bootstrap.InvokeOnceAsync();
243243

@@ -273,7 +273,7 @@ public async Task MidstreamError_SetsErrorStateWithExceptionDetails()
273273
throw new InvalidOperationException(errorMessage);
274274
};
275275

276-
using var bootstrap = new LambdaBootstrap(handler, null);
276+
using var bootstrap = new LambdaBootstrap(handler, null, null, new TestEnvironmentVariables());
277277
bootstrap.Client = client;
278278
await bootstrap.InvokeOnceAsync();
279279

@@ -457,7 +457,7 @@ public async Task BackwardCompat_ExistingHandlerSignature_WorksUnchanged()
457457
return new InvocationResponse(new MemoryStream(Encoding.UTF8.GetBytes("classic response")));
458458
};
459459

460-
using var bootstrap = new LambdaBootstrap(handler, null);
460+
using var bootstrap = new LambdaBootstrap(handler, null, null, new TestEnvironmentVariables());
461461
bootstrap.Client = client;
462462
await bootstrap.InvokeOnceAsync();
463463

@@ -481,7 +481,7 @@ public async Task BackwardCompat_BufferedResponse_NoRegression()
481481
return new InvocationResponse(new MemoryStream(expected));
482482
};
483483

484-
using var bootstrap = new LambdaBootstrap(handler, null);
484+
using var bootstrap = new LambdaBootstrap(handler, null, null, new TestEnvironmentVariables());
485485
bootstrap.Client = client;
486486
await bootstrap.InvokeOnceAsync();
487487

@@ -506,7 +506,7 @@ public async Task BackwardCompat_NullOutputStream_HandledGracefully()
506506
return new InvocationResponse(Stream.Null, false);
507507
};
508508

509-
using var bootstrap = new LambdaBootstrap(handler, null);
509+
using var bootstrap = new LambdaBootstrap(handler, null, null, new TestEnvironmentVariables());
510510
bootstrap.Client = client;
511511

512512
// Should not throw
@@ -529,7 +529,7 @@ public async Task BackwardCompat_HandlerThrows_StandardErrorReportingUsed()
529529
throw new Exception("classic handler error");
530530
};
531531

532-
using var bootstrap = new LambdaBootstrap(handler, null);
532+
using var bootstrap = new LambdaBootstrap(handler, null, null, new TestEnvironmentVariables());
533533
bootstrap.Client = client;
534534
await bootstrap.InvokeOnceAsync();
535535

0 commit comments

Comments
 (0)