Skip to content

Commit

Permalink
RavenDB-22983 - categorize compression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
garayx committed Dec 15, 2024
1 parent cf1e795 commit ed469e3
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 43 deletions.
34 changes: 17 additions & 17 deletions test/SlowTests/Issues/RavenDB-21427.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public RavenDB_21427(ITestOutputHelper output) : base(output)
private const string RL_DEV = "RAVEN_LICENSE_DEVELOPER";
private const string RL_PRO = "RAVEN_LICENSE_PROFESSIONAL";

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing | RavenTestCategory.Sharding)]
public async Task Prevent_License_Downgrade_Multi_Node_Sharding()
{
DoNotReuseServer();
Expand All @@ -66,7 +66,7 @@ public async Task Prevent_License_Downgrade_Multi_Node_Sharding()
}
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing | RavenTestCategory.Etl)]
public async Task Prevent_License_Downgrade_QueueSink()
{
DoNotReuseServer();
Expand Down Expand Up @@ -131,7 +131,7 @@ public async Task Prevent_License_Downgrade_QueueSink()
await TryToChangeLicense(Server, RL_PRO, LimitType.QueueSink);
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing | RavenTestCategory.ExpirationRefresh)]
public async Task Prevent_License_Downgrade_DataArchival()
{
DoNotReuseServer();
Expand All @@ -144,7 +144,7 @@ public async Task Prevent_License_Downgrade_DataArchival()
await TryToChangeLicense(Server, RL_PRO, LimitType.DataArchival);
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing | RavenTestCategory.Indexes)]
public async Task Prevent_License_Downgrade_Static_Index_Count_Per_Database()
{
DoNotReuseServer();
Expand All @@ -163,7 +163,7 @@ public async Task Prevent_License_Downgrade_Static_Index_Count_Per_Database()
}
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing | RavenTestCategory.Indexes)]
public async Task Prevent_License_Downgrade_Static_Index_Count_Per_Cluster()
{
DoNotReuseServer();
Expand All @@ -189,7 +189,7 @@ public async Task Prevent_License_Downgrade_Static_Index_Count_Per_Cluster()
}
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing | RavenTestCategory.Indexes)]
public async Task Prevent_License_Downgrade_Auto_Index_Count_Per_Database()
{
DoNotReuseServer();
Expand All @@ -208,7 +208,7 @@ public async Task Prevent_License_Downgrade_Auto_Index_Count_Per_Database()
}
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing | RavenTestCategory.Indexes)]
public async Task Prevent_License_Downgrade_Auto_Index_Count_Per_Cluster()
{
DoNotReuseServer();
Expand All @@ -235,7 +235,7 @@ public async Task Prevent_License_Downgrade_Auto_Index_Count_Per_Cluster()

}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing | RavenTestCategory.Revisions)]
public async Task Prevent_License_Downgrade_Revision_Default_Configuration()
{
DoNotReuseServer();
Expand Down Expand Up @@ -267,7 +267,7 @@ public async Task Prevent_License_Downgrade_Revision_Default_Configuration()
}
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing | RavenTestCategory.BackupExportImport)]
public async Task Prevent_License_Downgrade_PeriodicBackup()
{
DoNotReuseServer();
Expand All @@ -281,7 +281,7 @@ public async Task Prevent_License_Downgrade_PeriodicBackup()
}
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing)]
public async Task Prevent_License_Downgrade_Sorters_Per_Database()
{
DoNotReuseServer();
Expand All @@ -307,7 +307,7 @@ public async Task Prevent_License_Downgrade_Sorters_Per_Database()
}
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing)]
public async Task Prevent_License_Downgrade_Sorters_Per_Cluster()
{
DoNotReuseServer();
Expand Down Expand Up @@ -337,7 +337,7 @@ public async Task Prevent_License_Downgrade_Sorters_Per_Cluster()
}
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing)]
public async Task Prevent_License_Downgrade_Analyzer_Per_Database()
{
DoNotReuseServer();
Expand All @@ -363,7 +363,7 @@ public async Task Prevent_License_Downgrade_Analyzer_Per_Database()
}
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing)]
public async Task Prevent_License_Downgrade_Analyzer_Per_Cluster()
{
DoNotReuseServer();
Expand Down Expand Up @@ -394,7 +394,7 @@ public async Task Prevent_License_Downgrade_Analyzer_Per_Cluster()

}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing | RavenTestCategory.ClientApi)]
public async Task Prevent_License_Downgrade_ClientConfiguration()
{
DoNotReuseServer();
Expand All @@ -404,7 +404,7 @@ public async Task Prevent_License_Downgrade_ClientConfiguration()
}
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing)]
public async Task Prevent_License_Downgrade_StudioConfiguration()
{
DoNotReuseServer();
Expand All @@ -417,7 +417,7 @@ public async Task Prevent_License_Downgrade_StudioConfiguration()
await TryToChangeLicense(Server, RL_COMM, LimitType.StudioConfiguration);
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing | RavenTestCategory.ExpirationRefresh)]
public async Task Prevent_License_Downgrade_Expiration_Configuration()
{
DoNotReuseServer();
Expand All @@ -431,7 +431,7 @@ public async Task Prevent_License_Downgrade_Expiration_Configuration()
}
}

[MultiLicenseRequiredFact]
[RavenMultiLicenseRequiredFact(RavenTestCategory.Licensing | RavenTestCategory.ExpirationRefresh)]
public async Task Prevent_License_Downgrade_Refresh_Configuration()
{
DoNotReuseServer();
Expand Down
3 changes: 1 addition & 2 deletions test/SlowTests/Issues/RavenDB_21043.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ public RavenDB_21043(ITestOutputHelper output) : base(output)
{
}

[RavenTheory(RavenTestCategory.Indexes)]
[RavenTheory(RavenTestCategory.Indexes | RavenTestCategory.Compression)]
[RavenData(SearchEngineMode = RavenSearchEngineMode.Corax)]
public void Should_Be_Able_To_Train_Corax_Dictionary_on_Compare_Exchange_Values_and_compressed_docs(Options options)
{
const int numberOfCompanies = 256;
const int numberOfAddresses = 16;

DoNotReuseServer();
options.IgnoreDocumentCompression = true;
using (var store = GetDocumentStore(options))
{
// turn on compression
Expand Down
26 changes: 10 additions & 16 deletions test/SlowTests/Server/Documents/DataArchival/DataArchivalTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private async Task SetupDataArchival(DocumentStore store)
await DataArchivalHelper.SetupDataArchival(store, Server.ServerStore, config);
}

[RavenTheory(RavenTestCategory.ExpirationRefresh)]
[RavenTheory(RavenTestCategory.ExpirationRefresh | RavenTestCategory.Compression)]
[InlineData(false)]
[InlineData(true)]
public async Task CanSetupDataArchival(bool compressed)
Expand All @@ -59,8 +59,7 @@ public async Task CanSetupDataArchival(bool compressed)
record.DocumentsCompression = new DocumentsCompressionConfiguration { CompressAllCollections = true, };

}
},
IgnoreDocumentCompression = true
}
}))
{
using (var session = store.OpenAsyncSession())
Expand Down Expand Up @@ -98,7 +97,7 @@ public async Task CanSetupDataArchival(bool compressed)
}
}

[RavenTheory(RavenTestCategory.ExpirationRefresh)]
[RavenTheory(RavenTestCategory.ExpirationRefresh | RavenTestCategory.Compression)]
[InlineData(false)]
[InlineData(true)]
public async Task WillArchiveAllDocumentsToBeArchivedInSingleRun_EvenWhenMoreThanBatchSize(bool compressed)
Expand All @@ -114,8 +113,7 @@ public async Task WillArchiveAllDocumentsToBeArchivedInSingleRun_EvenWhenMoreTha
{
record.DocumentsCompression = new DocumentsCompressionConfiguration { CompressAllCollections = true, };
}
},
IgnoreDocumentCompression = true
}
}))
{
await SetupDataArchival(store);
Expand Down Expand Up @@ -173,7 +171,7 @@ public async Task WillArchiveAllDocumentsToBeArchivedInSingleRun_EvenWhenMoreTha
}
}

[RavenTheory(RavenTestCategory.ExpirationRefresh)]
[RavenTheory(RavenTestCategory.ExpirationRefresh | RavenTestCategory.Compression)]
[InlineData(false)]
[InlineData(true)]
public async Task ShouldImportTask(bool compressed)
Expand All @@ -186,8 +184,7 @@ public async Task ShouldImportTask(bool compressed)
{
record.DocumentsCompression = new DocumentsCompressionConfiguration { CompressAllCollections = true, };
}
},
IgnoreDocumentCompression = true
}
}))
using (var dstStore = GetDocumentStore(new Options
{
Expand All @@ -197,8 +194,7 @@ public async Task ShouldImportTask(bool compressed)
{
record.DocumentsCompression = new DocumentsCompressionConfiguration { CompressAllCollections = true, };
}
},
IgnoreDocumentCompression = true
}
}))
{
await SetupDataArchival(srcStore);
Expand All @@ -215,7 +211,7 @@ public async Task ShouldImportTask(bool compressed)
}
}

[RavenTheory(RavenTestCategory.ExpirationRefresh)]
[RavenTheory(RavenTestCategory.ExpirationRefresh | RavenTestCategory.Compression)]
[InlineData(false)]
[InlineData(true)]
public async Task ThrowsIfUsingWrongArchiveAtDateTimeFormat(bool compressed)
Expand All @@ -228,8 +224,7 @@ public async Task ThrowsIfUsingWrongArchiveAtDateTimeFormat(bool compressed)
{
record.DocumentsCompression = new DocumentsCompressionConfiguration { CompressAllCollections = true, };
}
},
IgnoreDocumentCompression = true
}
}))
{
using (var session = store.OpenAsyncSession())
Expand All @@ -245,12 +240,11 @@ public async Task ThrowsIfUsingWrongArchiveAtDateTimeFormat(bool compressed)
}
}

[RavenTheory(RavenTestCategory.Configuration)]
[RavenTheory(RavenTestCategory.Configuration | RavenTestCategory.Compression)]
[RavenData(true, DatabaseMode = RavenDatabaseMode.All)]
[RavenData(false, DatabaseMode = RavenDatabaseMode.All)]
public async Task ArchiveDocsWithMaxItemsToProcessConfiguredShouldWork(Options options, bool compressed)
{
options.IgnoreDocumentCompression = true;
using (var store = GetDocumentStore(options))
{
if (compressed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ public DocumentsCompressionConfigurationTests(ITestOutputHelper output) : base(o
{
}

[Theory]
[RavenTheory(RavenTestCategory.Compression)]
[RavenData(DatabaseMode = RavenDatabaseMode.All)]
public async Task CanPostAndGetDocumentsCompressionConfiguration(Options options)
{
var dbname = "CompressAllCollectionsDB";
options.ModifyDatabaseName = _ => dbname;
options.IgnoreDocumentCompression = true;

using (var store = GetDocumentStore(options))
{
Expand Down
7 changes: 2 additions & 5 deletions test/SlowTests/Sharding/Cluster/BucketStatsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -664,15 +664,12 @@ await store.Maintenance.SendAsync(new DeleteRevisionsOperation(new DeleteRevisio
}
}

[RavenFact(RavenTestCategory.Sharding, Skip = "RavenDB-19530 : bucket stats counts the RawSize of the value instead of the CompressedSize")]
[RavenFact(RavenTestCategory.Sharding | RavenTestCategory.Compression, Skip = "RavenDB-19530 : bucket stats counts the RawSize of the value instead of the CompressedSize")]
public async Task BucketStatsWithDocumentsCompression()
{
const string id = "companies/1";

using (var store = Sharding.GetDocumentStore(new Options()
{
IgnoreDocumentCompression = true
}))
using (var store = Sharding.GetDocumentStore())
{
var bucket = await Sharding.GetBucketAsync(store, id);

Expand Down
2 changes: 1 addition & 1 deletion test/SlowTests/Tests/TestsInheritanceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ where Filter(method)

var array = types.ToArray();

const int numberToTolerate = 4554;
const int numberToTolerate = 4545;

if (array.Length == numberToTolerate)
return;
Expand Down

0 comments on commit ed469e3

Please sign in to comment.