Skip to content

Commit

Permalink
More ValueTasks, more Fast.
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryCordewener committed Nov 16, 2024
1 parent c9f13c9 commit 6dc30f9
Show file tree
Hide file tree
Showing 42 changed files with 175 additions and 175 deletions.
2 changes: 1 addition & 1 deletion Core.Arango.Tests/AnalyzerViewTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class AnalyzerViewTest : TestBase
{
[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task AnalyzersViews(string serializer)
public async ValueTask AnalyzersViews(string serializer)
{
await SetupAsync(serializer);

Expand Down
2 changes: 1 addition & 1 deletion Core.Arango.Tests/BackupTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Core.Arango.Tests
/*public class BackupTest : TestBase
{
[Fact]
public async Task BackupRestoreDelete()
public async ValueTask BackupRestoreDelete()
{
await SetupAsync("system-camel");
Expand Down
2 changes: 1 addition & 1 deletion Core.Arango.Tests/CamelCaseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class CamelCaseTest : TestBase
{
[Theory]
[ClassData(typeof(CamelCaseData))]
public async Task GetCamelCase(string serializer)
public async ValueTask GetCamelCase(string serializer)
{
await SetupAsync(serializer);
await Arango.Collection.CreateAsync("test", "test", ArangoCollectionType.Document);
Expand Down
6 changes: 3 additions & 3 deletions Core.Arango.Tests/CollectionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public CollectionTest(ITestOutputHelper output)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task Create(string serializer)
public async ValueTask Create(string serializer)
{
await SetupAsync(serializer);
await Arango.Collection.CreateAsync("test", new ArangoCollection
Expand All @@ -40,7 +40,7 @@ public async Task Create(string serializer)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task CreateExistGetDrop(string serializer)
public async ValueTask CreateExistGetDrop(string serializer)
{
await SetupAsync(serializer);
await Arango.Collection.CreateAsync("test", new ArangoCollection
Expand All @@ -63,7 +63,7 @@ public async Task CreateExistGetDrop(string serializer)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task Schema(string serializer)
public async ValueTask Schema(string serializer)
{
await SetupAsync(serializer);
if ((await Arango.GetVersionAsync()).SemanticVersion < Version.Parse("3.7"))
Expand Down
6 changes: 3 additions & 3 deletions Core.Arango.Tests/Core/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public abstract class TestBase : IAsyncLifetime
{
public IArangoContext Arango { get; protected set; }

public virtual Task InitializeAsync()
public virtual ValueTask InitializeAsync()
{
return Task.CompletedTask;
}

public async Task DisposeAsync()
public async ValueTask DisposeAsync()
{
try
{
Expand All @@ -32,7 +32,7 @@ public async Task DisposeAsync()
}
}

public async Task SetupAsync(string serializer, string createDatabase = "test")
public async ValueTask SetupAsync(string serializer, string createDatabase = "test")
{
Arango = new ArangoContext(UniqueTestRealm(), new ArangoConfiguration
{
Expand Down
4 changes: 2 additions & 2 deletions Core.Arango.Tests/DatabaseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public DatabaseTest(ITestOutputHelper output)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task Create(string serializer)
public async ValueTask Create(string serializer)
{
await SetupAsync(serializer, null);

Expand All @@ -39,7 +39,7 @@ await Arango.Database.CreateAsync(new ArangoDatabase

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task Drop(string serializer)
public async ValueTask Drop(string serializer)
{
await SetupAsync(serializer, null);

Expand Down
22 changes: 11 additions & 11 deletions Core.Arango.Tests/DocumentTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class DocumentTest : TestBase
{
[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task Get(string serializer)
public async ValueTask Get(string serializer)
{
await SetupAsync(serializer);
await Arango.Collection.CreateAsync("test", "test", ArangoCollectionType.Document);
Expand Down Expand Up @@ -50,7 +50,7 @@ public async Task Get(string serializer)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task Update(string serializer)
public async ValueTask Update(string serializer)
{
await SetupAsync(serializer);
await Arango.Collection.CreateAsync("test", "test", ArangoCollectionType.Document);
Expand Down Expand Up @@ -88,7 +88,7 @@ public async Task Update(string serializer)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task CreateUpdateMode(string serializer)
public async ValueTask CreateUpdateMode(string serializer)
{
await SetupAsync(serializer);
if ((await Arango.GetVersionAsync()).SemanticVersion < Version.Parse("3.7"))
Expand Down Expand Up @@ -124,7 +124,7 @@ public async Task CreateUpdateMode(string serializer)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task CreateReplaceMode(string serializer)
public async ValueTask CreateReplaceMode(string serializer)
{
await SetupAsync(serializer);
if ((await Arango.GetVersionAsync()).SemanticVersion < Version.Parse("3.7"))
Expand Down Expand Up @@ -160,7 +160,7 @@ public async Task CreateReplaceMode(string serializer)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task CreateSilent(string serializer)
public async ValueTask CreateSilent(string serializer)
{
await SetupAsync(serializer);

Expand All @@ -175,7 +175,7 @@ public async Task CreateSilent(string serializer)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task CreateManySilent(string serializer)
public async ValueTask CreateManySilent(string serializer)
{
await SetupAsync(serializer);

Expand All @@ -198,7 +198,7 @@ public async Task CreateManySilent(string serializer)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task DeleteMany(string serializer)
public async ValueTask DeleteMany(string serializer)
{
await SetupAsync(serializer);

Expand Down Expand Up @@ -240,7 +240,7 @@ public async Task DeleteMany(string serializer)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task CreateConflictMode(string serializer)
public async ValueTask CreateConflictMode(string serializer)
{
await SetupAsync(serializer);
if ((await Arango.GetVersionAsync()).SemanticVersion < Version.Parse("3.7"))
Expand Down Expand Up @@ -271,7 +271,7 @@ public async Task CreateConflictMode(string serializer)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task OptimisticConcurrency(string serializer)
public async ValueTask OptimisticConcurrency(string serializer)
{
await SetupAsync(serializer);
await Arango.Collection.CreateAsync("test", "test", ArangoCollectionType.Document);
Expand Down Expand Up @@ -308,7 +308,7 @@ public async Task OptimisticConcurrency(string serializer)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task OptimisticConcurrencyMulti(string serializer)
public async ValueTask OptimisticConcurrencyMulti(string serializer)
{
await SetupAsync(serializer);
await Arango.Collection.CreateAsync("test", "test", ArangoCollectionType.Document);
Expand Down Expand Up @@ -354,7 +354,7 @@ public async Task OptimisticConcurrencyMulti(string serializer)

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task GetManyTest(string serializer)
public async ValueTask GetManyTest(string serializer)
{
await SetupAsync(serializer);
await Arango.Collection.CreateAsync("test", "test", ArangoCollectionType.Document);
Expand Down
4 changes: 2 additions & 2 deletions Core.Arango.Tests/FoxxTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Core.Arango.Tests
public class FoxxTest : TestBase
{
[Fact]
public async Task InstallScript()
public async ValueTask InstallScript()
{
await SetupAsync("system-camel");

Expand Down Expand Up @@ -101,7 +101,7 @@ await index.WriteAsync(Encoding.UTF8.GetBytes($@"
}

[Fact]
public async Task InstallZip()
public async ValueTask InstallZip()
{
await SetupAsync("system-camel");

Expand Down
2 changes: 1 addition & 1 deletion Core.Arango.Tests/FunctionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class FunctionTest : TestBase

[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task Run(string serializer)
public async ValueTask Run(string serializer)
{
await SetupAsync(serializer);
var function = Arango.Function;
Expand Down
6 changes: 3 additions & 3 deletions Core.Arango.Tests/GraphTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class GraphTest : TestBase
{
[Theory]
[ClassData(typeof(CamelCaseData))]
public async Task Get(string serializer)
public async ValueTask Get(string serializer)
{
await SetupAsync(serializer);
await Arango.Collection.CreateAsync("test", "vertices", ArangoCollectionType.Document);
Expand Down Expand Up @@ -108,7 +108,7 @@ public async Task Get(string serializer)

[Theory]
[ClassData(typeof(CamelCaseData))]
public async Task TransactionalOperations(string serializer)
public async ValueTask TransactionalOperations(string serializer)
{
await SetupAsync(serializer);
await Arango.Collection.CreateAsync("test", "vertices", ArangoCollectionType.Document);
Expand Down Expand Up @@ -230,7 +230,7 @@ public async Task TransactionalOperations(string serializer)

[Theory]
[ClassData(typeof(CamelCaseData))]
public async Task ReplaceEdgeDefinition(string serializer)
public async ValueTask ReplaceEdgeDefinition(string serializer)
{
await SetupAsync(serializer);
await Arango.Collection.CreateAsync("test", "vertices1", ArangoCollectionType.Document);
Expand Down
2 changes: 1 addition & 1 deletion Core.Arango.Tests/IndexTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class IndexTest : TestBase
{
[Theory]
[ClassData(typeof(PascalCaseData))]
public async Task DropAll(string serializer)
public async ValueTask DropAll(string serializer)
{
await SetupAsync(serializer);
await Arango.Collection.CreateAsync("test", "test", ArangoCollectionType.Document);
Expand Down
Loading

0 comments on commit 6dc30f9

Please sign in to comment.