diff --git a/Directory.Build.props b/Directory.Build.props index 2e2b7fb3b..eecbb8220 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -13,7 +13,7 @@ pdbonly true - 2.49.0 - 2.50.0 + 2.59.0 + 2.59.0 diff --git a/src/EventStore.Client/EventStore.Client.csproj b/src/EventStore.Client/EventStore.Client.csproj index ca10005c9..2bbe5b29e 100644 --- a/src/EventStore.Client/EventStore.Client.csproj +++ b/src/EventStore.Client/EventStore.Client.csproj @@ -6,9 +6,9 @@ EventStore.Client.Grpc - + - + diff --git a/test/EventStore.Client.Tests.Common/EventStore.Client.Tests.Common.csproj b/test/EventStore.Client.Tests.Common/EventStore.Client.Tests.Common.csproj index 303d73840..3608cdb92 100644 --- a/test/EventStore.Client.Tests.Common/EventStore.Client.Tests.Common.csproj +++ b/test/EventStore.Client.Tests.Common/EventStore.Client.Tests.Common.csproj @@ -11,13 +11,6 @@ - - - - - - - @@ -34,6 +27,14 @@ + + + + + + + + certs\%(RecursiveDir)/%(FileName)%(Extension) diff --git a/test/EventStore.Client.Tests.Common/Facts/AnonymousAccess.cs b/test/EventStore.Client.Tests.Common/Facts/AnonymousAccess.cs index 3fd901892..575093085 100644 --- a/test/EventStore.Client.Tests.Common/Facts/AnonymousAccess.cs +++ b/test/EventStore.Client.Tests.Common/Facts/AnonymousAccess.cs @@ -1,14 +1,11 @@ namespace EventStore.Client.Tests; +[PublicAPI] public class AnonymousAccess { static readonly Version LegacySince = new(23, 6); static readonly string SkipMessage = "Anonymous access is turned off since v23.6.0!"; - public class FactAttribute : Deprecation.FactAttribute { - public FactAttribute() : base(LegacySince, SkipMessage) { } - } + public class FactAttribute() : Deprecation.FactAttribute(LegacySince, SkipMessage); - public class TheoryAttribute : Deprecation.TheoryAttribute { - public TheoryAttribute() : base(LegacySince, SkipMessage) { } - } + public class TheoryAttribute() : Deprecation.TheoryAttribute(LegacySince, SkipMessage); } \ No newline at end of file diff --git a/test/EventStore.Client.Tests.Common/Facts/Deprecation.cs b/test/EventStore.Client.Tests.Common/Facts/Deprecation.cs index 111b3b016..01adee242 100644 --- a/test/EventStore.Client.Tests.Common/Facts/Deprecation.cs +++ b/test/EventStore.Client.Tests.Common/Facts/Deprecation.cs @@ -1,17 +1,10 @@ namespace EventStore.Client.Tests; +[PublicAPI] public class Deprecation { - public class FactAttribute : Xunit.FactAttribute { - readonly Version _legacySince; - readonly string _skipMessage; - - public FactAttribute(Version since, string skipMessage) { - _legacySince = since; - _skipMessage = skipMessage; - } - + public class FactAttribute(Version since, string skipMessage) : Xunit.FactAttribute { public override string? Skip { - get => EventStoreTestServer.Version >= _legacySince ? _skipMessage : null; + get => EventStoreTestServer.Version >= since ? skipMessage : null; set => throw new NotSupportedException(); } } diff --git a/test/EventStore.Client.Tests.Common/Facts/Regression.cs b/test/EventStore.Client.Tests.Common/Facts/Regression.cs index 371c00547..3c6a92f0c 100644 --- a/test/EventStore.Client.Tests.Common/Facts/Regression.cs +++ b/test/EventStore.Client.Tests.Common/Facts/Regression.cs @@ -1,32 +1,17 @@ namespace EventStore.Client.Tests; +[PublicAPI] public class Regression { - public class FactAttribute : Xunit.FactAttribute { - readonly int _major; - readonly string _skipMessage; - - public FactAttribute(int major, string skipMessage) { - _major = major; - _skipMessage = skipMessage; - } - + public class FactAttribute(int major, string skipMessage) : Xunit.FactAttribute { public override string? Skip { - get => (EventStoreTestServer.Version?.Major ?? int.MaxValue) < _major ? _skipMessage : null; + get => (EventStoreTestServer.Version?.Major ?? int.MaxValue) < major ? skipMessage : null; set => throw new NotSupportedException(); } } - public class TheoryAttribute : Xunit.TheoryAttribute { - readonly int _major; - readonly string _skipMessage; - - public TheoryAttribute(int major, string skipMessage) { - _major = major; - _skipMessage = skipMessage; - } - + public class TheoryAttribute(int major, string skipMessage) : Xunit.TheoryAttribute { public override string? Skip { - get => (EventStoreTestServer.Version?.Major ?? int.MaxValue) < _major ? _skipMessage : null; + get => (EventStoreTestServer.Version?.Major ?? int.MaxValue) < major ? skipMessage : null; set => throw new NotSupportedException(); } } diff --git a/test/EventStore.Client.Tests.Common/Facts/SupportsPSToAllFact.cs b/test/EventStore.Client.Tests.Common/Facts/SupportsPSToAllFact.cs index 9200aaf46..3f5d993fe 100644 --- a/test/EventStore.Client.Tests.Common/Facts/SupportsPSToAllFact.cs +++ b/test/EventStore.Client.Tests.Common/Facts/SupportsPSToAllFact.cs @@ -1,5 +1,8 @@ +// ReSharper disable InconsistentNaming + namespace EventStore.Client.Tests; +[PublicAPI] public class SupportsPSToAll { const int SupportedFromMajorVersion = 21; @@ -9,11 +12,7 @@ public class SupportsPSToAll { public static bool No => !Yes; public static bool Yes => (EventStoreTestServer.Version?.Major ?? int.MaxValue) >= SupportedFromMajorVersion; - public class FactAttribute : Regression.FactAttribute { - public FactAttribute() : base(SupportedFromMajorVersion, SkipMessage) { } - } + public class FactAttribute() : Regression.FactAttribute(SupportedFromMajorVersion, SkipMessage); - public class TheoryAttribute : Regression.TheoryAttribute { - public TheoryAttribute() : base(SupportedFromMajorVersion, SkipMessage) { } - } + public class TheoryAttribute() : Regression.TheoryAttribute(SupportedFromMajorVersion, SkipMessage); } \ No newline at end of file diff --git a/test/EventStore.Client.Tests.Common/Fixtures/Base/EventStoreTestServer.cs b/test/EventStore.Client.Tests.Common/Fixtures/Base/EventStoreTestServer.cs index 98ec6ebb2..772946347 100644 --- a/test/EventStore.Client.Tests.Common/Fixtures/Base/EventStoreTestServer.cs +++ b/test/EventStore.Client.Tests.Common/Fixtures/Base/EventStoreTestServer.cs @@ -33,7 +33,7 @@ public EventStoreTestServer( }; var env = new Dictionary { - ["EVENTSTORE_DB_LOG_FORMAT"] = GlobalEnvironment.DbLogFormat, + ["EVENTSTORE_DB_LOG_FORMAT"] = "V2", ["EVENTSTORE_MEM_DB"] = "true", ["EVENTSTORE_CHUNK_SIZE"] = (1024 * 1024).ToString(), ["EVENTSTORE_CERTIFICATE_FILE"] = "/etc/eventstore/certs/node/node.crt", diff --git a/test/EventStore.Client.Tests.Common/Fixtures/EventStoreTestCluster.cs b/test/EventStore.Client.Tests.Common/Fixtures/EventStoreTestCluster.cs index d0f0bbe88..f97b852e2 100644 --- a/test/EventStore.Client.Tests.Common/Fixtures/EventStoreTestCluster.cs +++ b/test/EventStore.Client.Tests.Common/Fixtures/EventStoreTestCluster.cs @@ -26,8 +26,7 @@ public static EventStoreFixtureOptions DefaultOptions() { ["EVENTSTORE_DISCOVER_VIA_DNS"] = "false", ["EVENTSTORE_ENABLE_EXTERNAL_TCP"] = "false", ["EVENTSTORE_STREAM_EXISTENCE_FILTER_SIZE"] = "10000", - ["EVENTSTORE_STREAM_INFO_CACHE_CAPACITY"] = "10000", - ["EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP"] = "true" // why true? + ["EVENTSTORE_STREAM_INFO_CACHE_CAPACITY"] = "10000" }; return new(defaultSettings, defaultEnvironment); diff --git a/test/EventStore.Client.Tests.Common/FluentDocker/TestService.cs b/test/EventStore.Client.Tests.Common/FluentDocker/TestService.cs index 7b90a89c7..3e10cbeb2 100644 --- a/test/EventStore.Client.Tests.Common/FluentDocker/TestService.cs +++ b/test/EventStore.Client.Tests.Common/FluentDocker/TestService.cs @@ -1,4 +1,3 @@ -using Ductus.FluentDocker; using Ductus.FluentDocker.Builders; using Ductus.FluentDocker.Common; using Ductus.FluentDocker.Services; diff --git a/test/EventStore.Client.Tests.Common/GlobalEnvironment.cs b/test/EventStore.Client.Tests.Common/GlobalEnvironment.cs index 563ff4cb6..d797a8369 100644 --- a/test/EventStore.Client.Tests.Common/GlobalEnvironment.cs +++ b/test/EventStore.Client.Tests.Common/GlobalEnvironment.cs @@ -10,7 +10,6 @@ static GlobalEnvironment() { UseCluster = Application.Configuration.GetValue("ES_USE_CLUSTER"); UseExternalServer = Application.Configuration.GetValue("ES_USE_EXTERNAL_SERVER"); DockerImage = Application.Configuration.GetValue("ES_DOCKER_IMAGE")!; - DbLogFormat = Application.Configuration.GetValue("EVENTSTORE_DB_LOG_FORMAT")!; Variables = Application.Configuration.AsEnumerable() .Where(x => x.Key.StartsWith("ES_") || x.Key.StartsWith("EVENTSTORE_")) @@ -30,7 +29,6 @@ static void EnsureDefaults(IConfiguration configuration) { configuration.EnsureValue("EVENTSTORE_MEM_DB", "false"); configuration.EnsureValue("EVENTSTORE_RUN_PROJECTIONS", "None"); configuration.EnsureValue("EVENTSTORE_START_STANDARD_PROJECTIONS", "false"); - configuration.EnsureValue("EVENTSTORE_DB_LOG_FORMAT", "V2"); configuration.EnsureValue("EVENTSTORE_LOG_LEVEL", "Verbose"); configuration.EnsureValue("EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH", "/etc/eventstore/certs/ca"); @@ -43,7 +41,6 @@ static void EnsureDefaults(IConfiguration configuration) { public static bool UseCluster { get; } public static bool UseExternalServer { get; } public static string DockerImage { get; } - public static string DbLogFormat { get; } #region . Obsolete . diff --git a/test/EventStore.Client.Tests.Common/shared.env b/test/EventStore.Client.Tests.Common/shared.env index d8746d86a..2b8c93eff 100644 --- a/test/EventStore.Client.Tests.Common/shared.env +++ b/test/EventStore.Client.Tests.Common/shared.env @@ -4,7 +4,7 @@ EVENTSTORE_HTTP_PORT=2113 EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH=/etc/eventstore/certs/ca EVENTSTORE_DISCOVER_VIA_DNS=false EVENTSTORE_ENABLE_EXTERNAL_TCP=false -EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true +EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=false EVENTSTORE_STREAM_EXISTENCE_FILTER_SIZE=10000 # pass through from environment diff --git a/test/EventStore.Client.Tests/EventStore.Client.Tests.csproj b/test/EventStore.Client.Tests/EventStore.Client.Tests.csproj index 44a934d3b..0bd9cef57 100644 --- a/test/EventStore.Client.Tests/EventStore.Client.Tests.csproj +++ b/test/EventStore.Client.Tests/EventStore.Client.Tests.csproj @@ -16,8 +16,8 @@ - - + + all