diff --git a/test/FastTests/Server/Documents/DocCompression.cs b/test/FastTests/Server/Documents/DocCompression.cs index d9f87f5d457c..9642a3316d84 100644 --- a/test/FastTests/Server/Documents/DocCompression.cs +++ b/test/FastTests/Server/Documents/DocCompression.cs @@ -36,7 +36,7 @@ public static string RandomString(Random random, int length) .Select(s => s[random.Next(s.Length)]).ToArray()); } - [LicenseRequiredFact] + [RavenFact(RavenTestCategory.Compression, LicenseRequired = true)] public void Can_compact_from_no_compression_to_compressed() { var path = NewDataPath(); @@ -46,7 +46,6 @@ public void Can_compact_from_no_compression_to_compressed() { Path = path, RunInMemory = false, - IgnoreDocumentCompression = true }); store.Maintenance.Send(new CreateSampleDataOperation()); @@ -85,7 +84,7 @@ public void Can_compact_from_no_compression_to_compressed() } } - [LicenseRequiredFact] + [RavenFact(RavenTestCategory.Compression, LicenseRequired = true)] public void Can_compact_from_compression_to_not_compressed() { var path = NewDataPath(); @@ -95,7 +94,6 @@ public void Can_compact_from_compression_to_not_compressed() { Path = path, RunInMemory = false, - IgnoreDocumentCompression = true, ModifyDatabaseRecord = r => r.DocumentsCompression = new DocumentsCompressionConfiguration(true, "Orders") }); @@ -135,7 +133,7 @@ public void Can_compact_from_compression_to_not_compressed() } } - [LicenseRequiredFact] + [RavenFact(RavenTestCategory.Compression, LicenseRequired = true)] public void Can_compact_db_with_compressed_collections() { var path = NewDataPath(); @@ -146,7 +144,6 @@ public void Can_compact_db_with_compressed_collections() Path = path, RunInMemory = false, ModifyDatabaseRecord = record => record.DocumentsCompression = new DocumentsCompressionConfiguration(true, "Orders"), - IgnoreDocumentCompression = true, }); store.Maintenance.Send(new CreateSampleDataOperation()); @@ -176,14 +173,13 @@ public void Can_compact_db_with_compressed_collections() operation.WaitForCompletion(TimeSpan.FromMinutes(5)); } - [LicenseRequiredFact] + [RavenFact(RavenTestCategory.Compression, LicenseRequired = true)] public void Can_write_many_documents_without_breakage() { var random = new Random(654); using var store = GetDocumentStore(new Options { ModifyDatabaseRecord = record => record.DocumentsCompression = new DocumentsCompressionConfiguration(true, "Users"), - IgnoreDocumentCompression = true, }); var rnd = Enumerable.Range(1, 10) @@ -205,10 +201,7 @@ public void Can_write_many_documents_without_breakage() public void Can_set_collection_compressed_when_it_has_docs() { var random = new Random(343); - using var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - }); + using var store = GetDocumentStore(); var rnd = Enumerable.Range(1, 10) .Select(i => new string((char)(65 + i), 256)) @@ -256,14 +249,13 @@ public void Can_set_collection_compressed_when_it_has_docs() Assert.True(cmd.Result.ActualSize > cmd.Result.AllocatedSize); } - [LicenseRequiredFact] + [RavenFact(RavenTestCategory.Compression, LicenseRequired = true)] public void Can_update_many_documents_without_breakage() { var random = new Random(654); using var store = GetDocumentStore(new Options { ModifyDatabaseRecord = record => record.DocumentsCompression = new DocumentsCompressionConfiguration(true, "Users"), - IgnoreDocumentCompression = true, }); var rnd = Enumerable.Range(1, 10) @@ -301,14 +293,13 @@ public void Can_update_many_documents_without_breakage() } } - [LicenseRequiredFact] + [RavenFact(RavenTestCategory.Compression, LicenseRequired = true)] public void Can_update_many_documents_without_breakage_to_be_smaller() { var random = new Random(654); using var store = GetDocumentStore(new Options { ModifyDatabaseRecord = record => record.DocumentsCompression = new DocumentsCompressionConfiguration(true, "Users"), - IgnoreDocumentCompression = true, }); var rnd = Enumerable.Range(1, 10) diff --git a/test/SlowTests/Issues/RavenDB-15754.cs b/test/SlowTests/Issues/RavenDB-15754.cs index f1e822a3499d..3f4e361117e3 100644 --- a/test/SlowTests/Issues/RavenDB-15754.cs +++ b/test/SlowTests/Issues/RavenDB-15754.cs @@ -107,8 +107,7 @@ public async Task CanIndexReferencedCompressedDocumentsAndParentDocumentChange() ModifyDatabaseRecord = x => { x.DocumentsCompression = new DocumentsCompressionConfiguration(compressRevisions: false, compressAllCollections: true); - }, - IgnoreDocumentCompression = true + } })) { var company = new Company diff --git a/test/SlowTests/Issues/RavenDB-21273.cs b/test/SlowTests/Issues/RavenDB-21273.cs index 9d721ef5e9ea..a37623e5ed48 100644 --- a/test/SlowTests/Issues/RavenDB-21273.cs +++ b/test/SlowTests/Issues/RavenDB-21273.cs @@ -39,10 +39,7 @@ public async Task ExceptionWhenImportingAdditionalAssembliesWithCommunityLicense var file = GetTempFileName(); try { - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { var dbrecord = store.Maintenance.Server.Send(new GetDatabaseRecordOperation(store.Database)); dbrecord.DocumentsCompression.CompressRevisions = false; @@ -63,10 +60,7 @@ public async Task ExceptionWhenImportingAdditionalAssembliesWithCommunityLicense } - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { await ChangeLicense(Server, RL_COMM); var importOperation = await store.Smuggler.ImportAsync(new DatabaseSmugglerImportOptions(), file); @@ -90,10 +84,7 @@ public async Task ExceptionWhenImportingSnapshotWithCommunityLicense() var file = GetTempFileName(); try { - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { var config = Backup.CreateBackupConfiguration(backupPath, fullBackupFrequency: "* */1 * * *", incrementalBackupFrequency: "* */2 * * *", backupType: BackupType.Snapshot); await store.Maintenance.SendAsync(new UpdatePeriodicBackupOperation(config)); @@ -103,10 +94,7 @@ public async Task ExceptionWhenImportingSnapshotWithCommunityLicense() } - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { await ChangeLicense(Server, RL_COMM); @@ -135,10 +123,7 @@ public async Task ExceptionWhenImportingSnapshotWithProLicense() var file = GetTempFileName(); try { - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { var config = Backup.CreateBackupConfiguration(backupPath, fullBackupFrequency: "* */1 * * *", incrementalBackupFrequency: "* */2 * * *", backupType: BackupType.Snapshot); await store.Maintenance.SendAsync(new UpdatePeriodicBackupOperation(config)); @@ -150,10 +135,7 @@ public async Task ExceptionWhenImportingSnapshotWithProLicense() } - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { await ChangeLicense(Server, RL_PRO); @@ -185,10 +167,7 @@ public async Task ExceptionWhenImportingExternalReplicationWithCommunityLicense( var csName = $"cs/{Guid.NewGuid()}"; try { - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { var connectionString = new RavenConnectionString { @@ -207,10 +186,7 @@ public async Task ExceptionWhenImportingExternalReplicationWithCommunityLicense( await operation.WaitForCompletionAsync(TimeSpan.FromMinutes(1)); } - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { await ChangeLicense(Server, RL_COMM); @@ -239,10 +215,7 @@ public async Task ExceptionWhenImportingDelayedExternalReplicationWithProLicense var csName = $"cs/{Guid.NewGuid()}"; try { - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { var connectionString = new RavenConnectionString { @@ -261,10 +234,7 @@ public async Task ExceptionWhenImportingDelayedExternalReplicationWithProLicense await operation.WaitForCompletionAsync(TimeSpan.FromMinutes(1)); } - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { await ChangeLicense(Server, RL_COMM); @@ -291,10 +261,7 @@ public async Task ExceptionWhenImportingTsRollupAndRetentionWithCommunityLicense var file = GetTempFileName(); try { - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { var salesTsConfig = new TimeSeriesCollectionConfiguration { @@ -314,10 +281,7 @@ public async Task ExceptionWhenImportingTsRollupAndRetentionWithCommunityLicense await operation.WaitForCompletionAsync(TimeSpan.FromMinutes(1)); } - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { await ChangeLicense(Server, RL_COMM); @@ -343,10 +307,7 @@ public async Task ExceptionWhenImportingCompressionWithCommunityLicense() var file = GetTempFileName(); try { - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { var dbrecord = store.Maintenance.Server.Send(new GetDatabaseRecordOperation(store.Database)); dbrecord.DocumentsCompression.CompressAllCollections = true; @@ -356,10 +317,7 @@ public async Task ExceptionWhenImportingCompressionWithCommunityLicense() await operation.WaitForCompletionAsync(TimeSpan.FromMinutes(1)); } - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { await ChangeLicense(Server, RL_COMM); @@ -385,10 +343,7 @@ public async Task ExceptionWhenImportingCompressionWithProLicense() var file = GetTempFileName(); try { - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { var dbrecord = store.Maintenance.Server.Send(new GetDatabaseRecordOperation(store.Database)); dbrecord.DocumentsCompression.CompressAllCollections = true; @@ -398,10 +353,7 @@ public async Task ExceptionWhenImportingCompressionWithProLicense() await operation.WaitForCompletionAsync(TimeSpan.FromMinutes(1)); } - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { await ChangeLicense(Server, RL_PRO); @@ -430,7 +382,7 @@ public async Task ExceptionWhenImportingPullReplicationAsSinkWithCommunityLicens var csName = $"cs/{Guid.NewGuid()}"; try { - using (var store = GetDocumentStore(new Options() { IgnoreDocumentCompression = true })) + using (var store = GetDocumentStore()) { var pullAsSink = new PullReplicationAsSink(dbName, csName, "hub"); var result = await store.Maintenance.SendAsync(new UpdatePullReplicationAsSinkOperation(pullAsSink)); @@ -440,10 +392,7 @@ public async Task ExceptionWhenImportingPullReplicationAsSinkWithCommunityLicens await operation.WaitForCompletionAsync(TimeSpan.FromMinutes(1)); } - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { await ChangeLicense(Server, RL_COMM); @@ -470,10 +419,7 @@ public async Task ExceptionWhenImportingPullReplicationAsHubWithCommunityLicense var file = GetTempFileName(); try { - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { store.Maintenance.Send(new PutPullReplicationAsHubOperation("sink")); @@ -481,10 +427,7 @@ public async Task ExceptionWhenImportingPullReplicationAsHubWithCommunityLicense await operation.WaitForCompletionAsync(TimeSpan.FromMinutes(1)); } - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { await ChangeLicense(Server, RL_COMM); @@ -512,10 +455,7 @@ public async Task ExceptionWhenImportingPullReplicationAsHubWithProLicense() var file = GetTempFileName(); try { - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { store.Maintenance.Send(new PutPullReplicationAsHubOperation("sink")); @@ -523,10 +463,7 @@ public async Task ExceptionWhenImportingPullReplicationAsHubWithProLicense() await operation.WaitForCompletionAsync(TimeSpan.FromMinutes(1)); } - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { await ChangeLicense(Server, RL_PRO); @@ -554,10 +491,7 @@ public async Task ExceptionWhenImportingRavenEtlWithCommunityLicense() var file = GetTempFileName(); try { - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { var etlConfiguration = new RavenEtlConfiguration { @@ -580,10 +514,7 @@ public async Task ExceptionWhenImportingRavenEtlWithCommunityLicense() await operation.WaitForCompletionAsync(TimeSpan.FromMinutes(1)); } - using (var store = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + using (var store = GetDocumentStore()) { await ChangeLicense(Server, RL_COMM); diff --git a/test/SlowTests/Issues/RavenDB_19529.cs b/test/SlowTests/Issues/RavenDB_19529.cs index 7a92ccbc24f1..585d915f7810 100644 --- a/test/SlowTests/Issues/RavenDB_19529.cs +++ b/test/SlowTests/Issues/RavenDB_19529.cs @@ -77,12 +77,12 @@ public async Task MergedTransaction_DeleteOneDoc_Then_PutAnotherToLargeSection_C const string documentToDeleteId = "users/2-A"; using (var server = GetNewServer(new ServerCreationOptions - { - CustomSettings = new Dictionary - { - [RavenConfiguration.GetKey(x => x.Databases.CompressAllCollectionsDefault)] = true.ToString(), - } - })) + { + CustomSettings = new Dictionary + { + [RavenConfiguration.GetKey(x => x.Databases.CompressAllCollectionsDefault)] = true.ToString(), + } + })) using (var store = GetDocumentStore(new Options { Server = server, RunInMemory = false })) { using (var session = store.OpenAsyncSession()) @@ -173,16 +173,16 @@ public async Task MergedTransaction_AddConflict_Then_PutUpdateDocumentOnLargeSec const string documentToConflictId = "users/2-A"; using (var storeSrc = GetDocumentStore(new Options() - { - IgnoreDocumentCompression = true - })) + { + IgnoreDocumentCompression = true + })) using (var storeDst = GetDocumentStore(new Options - { - ModifyDatabaseRecord = record => - { - record.ConflictSolverConfig = new ConflictSolver { ResolveToLatest = false, ResolveByCollection = new Dictionary() }; - }, - IgnoreDocumentCompression = true + { + ModifyDatabaseRecord = record => + { + record.ConflictSolverConfig = new ConflictSolver { ResolveToLatest = false, ResolveByCollection = new Dictionary() }; + }, + IgnoreDocumentCompression = true })) { storeDst.Maintenance.Send(new UpdateDocumentsCompressionConfigurationOperation(new DocumentsCompressionConfiguration { CompressAllCollections = true })); @@ -241,13 +241,13 @@ public async Task CanHandleChangingCompressionConfigurationInTheMiddleOfTransact const string documentToDeleteId = "users/2-A"; using (var server = GetNewServer(new ServerCreationOptions - { - CustomSettings = new Dictionary - { - [RavenConfiguration.GetKey(x => x.Databases.CompressAllCollectionsDefault)] = true.ToString(), - } - })) - using (var store = GetDocumentStore(new Options { Server = server, RunInMemory = false, IgnoreDocumentCompression = true })) + { + CustomSettings = new Dictionary + { + [RavenConfiguration.GetKey(x => x.Databases.CompressAllCollectionsDefault)] = true.ToString(), + } + })) + using (var store = GetDocumentStore(new Options { Server = server, RunInMemory = false })) { using (var session = store.OpenAsyncSession()) { @@ -366,20 +366,18 @@ public async Task MergedTransaction_ConflictForDocumentInDifferentCollection_The const string documentToConflictId = "users/2-A"; using (var storeSrc = GetDocumentStore(new Options - { - ModifyDatabaseRecord = record => - { - record.ConflictSolverConfig = new ConflictSolver { ResolveToLatest = false, ResolveByCollection = new Dictionary() }; - }, - IgnoreDocumentCompression = true + { + ModifyDatabaseRecord = record => + { + record.ConflictSolverConfig = new ConflictSolver { ResolveToLatest = false, ResolveByCollection = new Dictionary() }; + } })) using (var storeDst = GetDocumentStore(new Options - { - ModifyDatabaseRecord = record => - { - record.ConflictSolverConfig = new ConflictSolver { ResolveToLatest = false, ResolveByCollection = new Dictionary() }; - }, - IgnoreDocumentCompression = true + { + ModifyDatabaseRecord = record => + { + record.ConflictSolverConfig = new ConflictSolver { ResolveToLatest = false, ResolveByCollection = new Dictionary() }; + } })) { storeDst.Maintenance.Send(new UpdateDocumentsCompressionConfigurationOperation(new DocumentsCompressionConfiguration { CompressAllCollections = true })); diff --git a/test/Tests.Infrastructure/RavenFactAttribute.cs b/test/Tests.Infrastructure/RavenFactAttribute.cs index a145e01d0fe7..02da90a489dd 100644 --- a/test/Tests.Infrastructure/RavenFactAttribute.cs +++ b/test/Tests.Infrastructure/RavenFactAttribute.cs @@ -6,11 +6,12 @@ namespace Tests.Infrastructure; [TraitDiscoverer("Tests.Infrastructure.XunitExtensions.RavenTraitDiscoverer", "Tests.Infrastructure")] public class RavenFactAttribute : FactAttribute, ITraitAttribute { + public readonly RavenTestCategory Category; private string _skip; - private readonly RavenTestCategory _category; + public RavenFactAttribute(RavenTestCategory category) { - _category = category; + Category = category; } public bool LicenseRequired { get; set; } @@ -25,7 +26,7 @@ public override string Skip { get { - return ShouldSkip(_skip, _category, licenseRequired: LicenseRequired, nightlyBuildRequired: NightlyBuildRequired, msSqlRequired: MsSqlRequired, elasticSearchRequired: ElasticSearchRequired); + return ShouldSkip(_skip, Category, licenseRequired: LicenseRequired, nightlyBuildRequired: NightlyBuildRequired, msSqlRequired: MsSqlRequired, elasticSearchRequired: ElasticSearchRequired); } set => _skip = value; diff --git a/test/Tests.Infrastructure/RavenTestBase.cs b/test/Tests.Infrastructure/RavenTestBase.cs index 0b6a634d3204..d98e0beb24a2 100644 --- a/test/Tests.Infrastructure/RavenTestBase.cs +++ b/test/Tests.Infrastructure/RavenTestBase.cs @@ -8,6 +8,7 @@ using System.Net.Http; using System.Net.Sockets; using System.Net.WebSockets; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security.Cryptography.X509Certificates; @@ -33,6 +34,7 @@ using Tests.Infrastructure; using Xunit; using Xunit.Abstractions; +using Xunit.Sdk; namespace FastTests { @@ -234,13 +236,15 @@ protected internal virtual DocumentStore GetDocumentStore(Options options = null options.ModifyDatabaseRecord?.Invoke(doc); var sharded = doc.IsSharded; - if (doc.DocumentsCompression != null && options.IgnoreDocumentCompression == false) + var isCompressionTest = IsCompressionTest(); + + if (doc.DocumentsCompression != null && isCompressionTest == false) { // check in DatabaseRecord if document compression is enabled, without setting IgnoreDocumentCompression=true - Assert.Fail("Need to setup IgnoreDocumentCompression=true when DocumentsCompression is used in tests"); + Assert.Fail($"Please mark compression test with {nameof(RavenFactAttribute)} or {nameof(RavenTheoryAttribute)} attributes with {nameof(RavenTestCategory)}.{nameof(RavenTestCategory.Compression)} set."); } - if (RavenTestHelper.RunTestsWithDocsCompression && options.IgnoreDocumentCompression == false && doc.DocumentsCompression == null) + if (RavenTestHelper.RunTestsWithDocsCompression && doc.DocumentsCompression == null && isCompressionTest == false) { doc.DocumentsCompression = new DocumentsCompressionConfiguration { @@ -248,6 +252,7 @@ protected internal virtual DocumentStore GetDocumentStore(Options options = null CompressRevisions = true }; } + var store = new DocumentStore { Database = name, @@ -265,21 +270,6 @@ protected internal virtual DocumentStore GetDocumentStore(Options options = null store.Urls = GetUrls(serverToUse, store.Conventions.DisableTopologyUpdates); } - store.OnBeforeRequest += (sender, args) => - { - if (args.Request.Method != HttpMethod.Post) - return; - if (string.IsNullOrEmpty(args.Database)) - return; - if (args.Url.EndsWith("/admin/documents-compression/config") == false) - return; - - if (options.IgnoreDocumentCompression == false) - { - Assert.Fail("Need to setup IgnoreDocumentCompression=true when DocumentsCompression is used in tests"); - } - }; - store.Initialize(); var serverOperationStore = adminStore ?? store; @@ -356,6 +346,23 @@ protected internal virtual DocumentStore GetDocumentStore(Options options = null CreatedStores.Add(adminStore); return store; + + bool IsCompressionTest() + { + var testMethod = Context?.Test?.TestCase?.TestMethod?.Method as ReflectionMethodInfo; + if (testMethod == null) + return false; + + var ravenFactAttribute = testMethod.MethodInfo.GetCustomAttribute(); + if (ravenFactAttribute != null) + return ravenFactAttribute.Category.HasFlag(RavenTestCategory.Compression); + + var ravenTheoryAttribute = testMethod.MethodInfo.GetCustomAttribute(); + if (ravenTheoryAttribute != null) + return ravenTheoryAttribute.Category.HasFlag(RavenTestCategory.Compression); + + return false; + } } } catch (TimeoutException te) @@ -793,7 +800,7 @@ string DocumentExists() } } - protected override void Dispose(ExceptionAggregator exceptionAggregator) + protected override void Dispose(Raven.Server.Utils.ExceptionAggregator exceptionAggregator) { Etl.Dispose(); @@ -814,7 +821,6 @@ public class Options private X509Certificate2 _clientCertificate; private X509Certificate2 _adminCertificate; private bool _createDatabase; - private bool _ignoreDocumentCompression; private bool _deleteDatabaseOnDispose; private TimeSpan? _deleteTimeout; private RavenServer _server; @@ -1052,16 +1058,6 @@ public bool CreateDatabase } } - public bool IgnoreDocumentCompression - { - get => _ignoreDocumentCompression; - set - { - AssertNotFrozen(); - _ignoreDocumentCompression = value; - } - } - public bool RunInMemory { get => _runInMemory; diff --git a/test/Tests.Infrastructure/RavenTheoryAttribute.cs b/test/Tests.Infrastructure/RavenTheoryAttribute.cs index 67e9b38f72e3..7d7cd775b786 100644 --- a/test/Tests.Infrastructure/RavenTheoryAttribute.cs +++ b/test/Tests.Infrastructure/RavenTheoryAttribute.cs @@ -7,11 +7,11 @@ namespace Tests.Infrastructure; public class RavenTheoryAttribute : TheoryAttribute, ITraitAttribute { private string _skip; - private readonly RavenTestCategory _category; + public readonly RavenTestCategory Category; public RavenTheoryAttribute(RavenTestCategory category) { - _category = category; + Category = category; } public bool LicenseRequired { get; set; } @@ -26,7 +26,7 @@ public override string Skip { get { - return ShouldSkip(_skip, _category, licenseRequired: LicenseRequired, nightlyBuildRequired: NightlyBuildRequired, s3Required: S3Required, azureRequired: AzureRequired); + return ShouldSkip(_skip, Category, licenseRequired: LicenseRequired, nightlyBuildRequired: NightlyBuildRequired, s3Required: S3Required, azureRequired: AzureRequired); } set => _skip = value;