-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8dc1655
commit c138511
Showing
8 changed files
with
92 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,46 @@ | ||
using RabbitMQ.ConsoleTests; | ||
using Microsoft.Extensions.Logging; | ||
using HouseofCat.Utilities.Extensions; | ||
using HouseofCat.Utilities.Helpers; | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.Logging; | ||
using RabbitMQ.ConsoleTests; | ||
|
||
var loggerFactory = LogHelpers.CreateConsoleLoggerFactory(LogLevel.Information); | ||
LogHelpers.LoggerFactory = loggerFactory; | ||
var logger = loggerFactory.CreateLogger<Program>(); | ||
|
||
// Basic Tests | ||
//await BasicGetTests.RunBasicGetAsync(logger, "./RabbitMQ.BasicGetTests.json"); | ||
var builder = WebApplication.CreateBuilder(args); | ||
var configuration = new ConfigurationBuilder() | ||
.SetBasePath(AppContext.BaseDirectory) | ||
.AddJsonFile("appsettings.json") | ||
.Build(); | ||
|
||
builder.Services.AddOpenTelemetryExporter(configuration); | ||
|
||
using var app = builder.Build(); | ||
|
||
logger.LogInformation("Tests complete! Press CTRL+C to gracefully exit...."); | ||
|
||
// Publisher Tests | ||
//await PublisherTests.RunSlowPublisherTestAsync(logger, "./RabbitMQ.PublisherTests.json"); | ||
//await PublisherTests.RunAutoPublisherStandaloneAsync(); | ||
app.Lifetime.ApplicationStarted.Register( | ||
async () => | ||
{ | ||
// Basic Tests | ||
//await BasicGetTests.RunBasicGetAsync(logger, "./RabbitMQ.BasicGetTests.json"); | ||
|
||
// Consumer Tests | ||
//await ConsumerTests.RunConsumerTestAsync(logger, "./RabbitMQ.ConsumerTests.json"); | ||
// Publisher Tests | ||
//await PublisherTests.RunSlowPublisherTestAsync(logger, "./RabbitMQ.PublisherTests.json"); | ||
//await PublisherTests.RunAutoPublisherStandaloneAsync(); | ||
|
||
// PubSub Tests | ||
//await PubSubTests.RunPubSubTestAsync(logger, "./RabbitMQ.PubSubTests.json"); | ||
//await PubSubTests.RunPubSubCheckForDuplicateTestAsync(logger, "./RabbitMQ.PubSubTests.json"); | ||
// Consumer Tests | ||
//await ConsumerTests.RunConsumerTestAsync(logger, "./RabbitMQ.ConsumerTests.json"); | ||
|
||
// RabbitService Tests | ||
await RabbitServiceTests.RunRabbitServicePingPongTestAsync(loggerFactory, "./RabbitMQ.RabbitServiceTests.json"); | ||
//await RabbitServiceTests.RunRabbitServiceAltPingPongTestAsync(loggerFactory, "./RabbitMQ.RabbitServiceTests.json"); | ||
// PubSub Tests | ||
//await PubSubTests.RunPubSubTestAsync(logger, "./RabbitMQ.PubSubTests.json"); | ||
//await PubSubTests.RunPubSubCheckForDuplicateTestAsync(logger, "./RabbitMQ.PubSubTests.json"); | ||
|
||
logger.LogInformation("Tests complete! Press return to exit...."); | ||
// RabbitService Tests | ||
await RabbitServiceTests.RunRabbitServicePingPongTestAsync(loggerFactory, "./RabbitMQ.RabbitServiceTests.json"); | ||
//await RabbitServiceTests.RunRabbitServiceAltPingPongTestAsync(loggerFactory, "./RabbitMQ.RabbitServiceTests.json"); | ||
}); | ||
|
||
Console.ReadLine(); | ||
await app.RunAsync(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"OpenTelemetry": { | ||
"Enabled": false, | ||
"ServiceVersion": "v1.0.0", | ||
"Environment": "production", | ||
"EndpointUrl": "https://ingest.us.signoz.cloud:443", | ||
"HeaderFormat": "{0}={1}", | ||
"HeaderKey": "signoz-access-token", | ||
"ApiKey": "*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters