Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Particular.LicensingComponent.Contracts/AuditCount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ public class AuditCount
public DateOnly UtcDate { get; set; }
[JsonPropertyName("count")]
public long Count { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ public class ConnectionSettingsTestResult
public bool ConnectionSuccessful { get; set; }
public List<string> ConnectionErrorMessages { get; set; } = [];
public string Diagnostics { get; set; } = string.Empty;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ public class ConnectionTestResults(
public ConnectionSettingsTestResult AuditConnectionResult { get; } = auditConnectionResult;
public ConnectionSettingsTestResult MonitoringConnectionResult { get; } = monitoringConnectionResult;
public ConnectionSettingsTestResult BrokerConnectionResult { get; } = brokerConnectionResult;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public void Deconstruct(out DateOnly date, out long messageCount)
date = DateUTC;
messageCount = MessageCount;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ public override bool Equals(object? obj)
}

public override int GetHashCode() => HashCode.Combine(Name, ThroughputSource);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ public enum EndpointIndicator
DelayBinding,
KnownEndpoint,
PlatformEndpoint
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public enum EnvironmentDataType
AuditInstances,
ServiceControlVersion,
ServicePulseVersion
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public class RemoteInstanceInformation
public SemanticVersion? SemanticVersion { get; set; }
public TimeSpan Retention { get; set; }
public string? Transport { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ public class ReportGenerationState(string transport)
public string Transport { get; set; } = transport;
public bool ReportCanBeGenerated { get; set; }
public string Reason { get; set; } = "";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ public class ServiceControlEndpoint
public string Name { get; set; } = string.Empty;
public string UrlName => WebUtility.UrlEncode(Name);
public bool HeartbeatsEnabled { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public class ThroughputConnectionSetting(string name, string description)
{
public string Name { get; } = name;
public string Description { get; } = description;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ public ThroughputData(IEnumerable<EndpointDailyThroughput> throughput)
}

public ThroughputSource ThroughputSource { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public class ThroughputSettings(string serviceControlQueue, string errorQueue, s
public string TransportType { get; set; } = transportType;
public string CustomerName { get; } = customerName;
public string ServiceControlVersion { get; } = serviceControlVersion;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ public enum ThroughputSource
Broker,
Monitoring,
Audit
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ class EndpointCollection : KeyedCollection<EndpointIdentifier, Endpoint>
{
protected override EndpointIdentifier GetKeyForItem(Endpoint item) => item.Id;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Text.Json.Nodes;
using System.Threading;
using System.Threading.Tasks;
using Contracts;
using Microsoft.Extensions.Logging.Abstractions;
using NUnit.Framework;
using Particular.Approvals;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ class FakeAuditCountApi : IAuditCountApi
{
public Task<IList<ServiceControl.Api.Contracts.AuditCount>> GetEndpointAuditCounts(string endpoint, CancellationToken token) => throw new NotImplementedException();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ class FakeConfigurationApi : IConfigurationApi
public Task<RemoteConfiguration[]> GetRemoteConfigs(CancellationToken cancellationToken) => throw new NotImplementedException();
public Task<RootUrls> GetUrls(string baseUrl, CancellationToken cancellationToken) => throw new NotImplementedException();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ class FakeEndpointApi : IEndpointsApi
{
public Task<List<Endpoint>> GetEndpoints(CancellationToken cancellationToken) => throw new NotImplementedException();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
static class LicensingDataStoreExtensions
{
public static DataStoreBuilder CreateBuilder(this ILicensingDataStore dataStore) => new(dataStore);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

using System.Collections.Generic;
using System.Threading.Tasks;
using NUnit.Framework;
using Contracts;
using Infrastructure;
using NUnit.Framework;

[TestFixture]
class ThroughputCollector_Report_EnvironmentInformation_Tests : ThroughputCollectorTestFixture
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace Particular.LicensingComponent.UnitTests;

using System.Linq;
using System.Threading.Tasks;
using Contracts;
using Infrastructure;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using NUnit.Framework;
using Particular.LicensingComponent.Contracts;
using Particular.LicensingComponent.UnitTests.Infrastructure;
using ServiceControl.Transports.BrokerThroughput;
using System.Linq;

[TestFixture]
class ThroughputCollector_SanitizedNameGrouping_Tests : ThroughputCollectorTestFixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,4 @@ public async Task<ConnectionSettingsTestResult> TestAuditConnection(Cancellation
return connectionTestResult;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ public interface IAuditQuery
Task<ConnectionSettingsTestResult> TestAuditConnection(CancellationToken cancellationToken);

}
}
}
2 changes: 1 addition & 1 deletion src/Particular.LicensingComponent/IThroughputCollector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public interface IThroughputCollector
Task<List<string>> GetReportMasks(CancellationToken cancellationToken);
Task UpdateReportMasks(List<string> reportMaskUpdates, CancellationToken cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public static bool IsPlatformEndpoint(string endpointName, ThroughputSettings th
|| AuditThroughputCollectorHostedService.AuditQueues.Any(a => endpointName.Equals(a, StringComparison.OrdinalIgnoreCase));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ public static List<ThroughputConnectionSetting> GetMonitoringConnectionSettings(
return [new ThroughputConnectionSetting(MonitoringQueue, MonitoringQueueDescription)];
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ public static long Max(this List<ThroughputData> throughputs)

public static bool HasDataFromSource(this IDictionary<string, IEnumerable<ThroughputData>> throughputPerQueue, ThroughputSource source) =>
throughputPerQueue.Any(queueName => queueName.Value.Any(data => data.ThroughputSource == source && data.Count > 0));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ public async Task<IActionResult> UpdateMasks(List<string> updateMasks, Cancellat

readonly IThroughputCollector throughputCollector;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ public async Task Cleanup()
EmbeddedDatabase databaseInstance;
string databaseName;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
namespace ServiceControl.AcceptanceTests.Monitoring.CustomChecks
{
using System;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using AcceptanceTesting.EndpointTemplates;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Notifications;
Expand All @@ -9,12 +15,6 @@
using NUnit.Framework;
using ServiceBus.Management.Infrastructure.Settings;
using ServiceControl.Persistence;
using System;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using AcceptanceTesting.EndpointTemplates;

[TestFixture]
class When_email_notifications_are_enabled : AcceptanceTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
namespace ServiceControl.AcceptanceTests.Recoverability.ExternalIntegration
{
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using AcceptanceTesting;
using AcceptanceTesting.EndpointTemplates;
using Contracts;
using NServiceBus;
using NServiceBus.AcceptanceTesting;
using ServiceBus.Management.Infrastructure.Settings;
using NUnit.Framework;
using Contracts;
using ServiceBus.Management.Infrastructure.Settings;
using ServiceControl.MessageFailures;
using System.Collections.Generic;
using AcceptanceTesting.EndpointTemplates;
using JsonSerializer = System.Text.Json.JsonSerializer;

class When_a_failed_message_is_resolved_manually : ExternalIntegrationAcceptanceTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
namespace ServiceControl.AcceptanceTests.Recoverability.ExternalIntegration
{
using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Threading.Tasks;
using AcceptanceTesting;
using AcceptanceTesting.EndpointTemplates;
using Contracts;
using NServiceBus;
using NServiceBus.AcceptanceTesting;
using ServiceBus.Management.Infrastructure.Settings;
using NUnit.Framework;
using Contracts;
using ServiceBus.Management.Infrastructure.Settings;
using ServiceControl.MessageFailures;
using System.Collections.Generic;
using System.Text.Json;
using AcceptanceTesting.EndpointTemplates;

class When_a_failed_message_is_unarchived : ExternalIntegrationAcceptanceTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
using AcceptanceTesting.EndpointTemplates;
using NServiceBus;
using NServiceBus.AcceptanceTesting;
using ServiceBus.Management.Infrastructure.Settings;
using NUnit.Framework;
using ServiceBus.Management.Infrastructure.Settings;
using ServiceControl.Contracts;
using ServiceControl.MessageFailures;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
namespace ServiceControl.AcceptanceTests.Recoverability
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AcceptanceTesting.EndpointTemplates;
using NServiceBus;
using NServiceBus.AcceptanceTesting;
using NServiceBus.Routing;
using NServiceBus.Transport;
using NServiceBus;
using NUnit.Framework;
using ServiceControl.AcceptanceTesting;
using System.Collections.Generic;
using System;
using System.Linq;
using System.Threading.Tasks;
using AcceptanceTesting.EndpointTemplates;
using ServiceControl.Infrastructure;
using ServiceControl.MessageFailures;

Expand Down
2 changes: 1 addition & 1 deletion src/ServiceControl.Api/Contracts/AuditCount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ public class AuditCount
public DateTime UtcDate { get; set; }
public long Count { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion src/ServiceControl.Api/Contracts/Endpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public class Endpoint
public bool MonitorHeartbeat { get; set; }
public bool IsSendingHeartbeats { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion src/ServiceControl.Api/Contracts/RootUrls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ public class RootUrls
public string ArchivedGroupsUrl { get; set; }
public string GetArchiveGroup { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion src/ServiceControl.Api/IAuditCountApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ public interface IAuditCountApi
{
public Task<IList<AuditCount>> GetEndpointAuditCounts(string endpoint, CancellationToken token);
}
}
}
2 changes: 1 addition & 1 deletion src/ServiceControl.Api/IConfigurationApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public interface IConfigurationApi
public Task<object> GetConfig(CancellationToken cancellationToken);
public Task<RemoteConfiguration[]> GetRemoteConfigs(CancellationToken cancellationToken);
}
}
}
2 changes: 1 addition & 1 deletion src/ServiceControl.Api/IEndpointsApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ public interface IEndpointsApi
{
public Task<List<Endpoint>> GetEndpoints(CancellationToken cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ public async Task Cleanup()
await databaseInstance.DeleteDatabase(databaseName);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public class AcceptanceTestStorageConfiguration

public Task Cleanup() => Task.CompletedTask;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ public Task SaveFailedAuditImport(FailedAuditImport message)

public Task<int> GetFailedAuditsCount() => Task.FromResult(dataStore.failedAuditImports.Count);
}
}
}
Loading