Skip to content

Commit

Permalink
Added missing tests, removed fact skips
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Sep 26, 2024
1 parent 53d0cd2 commit 602cb67
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 30 deletions.
9 changes: 6 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
version: '2'

services:
azurite:
image: mcr.microsoft.com/azure-storage/azurite:latest
image: mcr.microsoft.com/azure-storage/azurite:3.9.0
ports:
- 10000:10000
- 10001:10001
- 10002:10002
deploy:
resources:
limits:
memory: 1g

ready:
image: andrewlock/wait-for-dependencies
command: azurite:10000
Expand Down
89 changes: 62 additions & 27 deletions tests/Foundatio.AzureStorage.Tests/Queues/AzureStorageQueueTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,83 +41,88 @@ protected override Task CleanupQueueAsync(IQueue<SimpleWorkItem> queue)
queue?.Dispose();
return Task.CompletedTask;
}

[Fact]
public override Task CanQueueAndDequeueWorkItemAsync()
{
return base.CanQueueAndDequeueWorkItemAsync();
}

[Fact]
public override Task CanDequeueWithCancelledTokenAsync()
public override Task CanQueueAndDequeueWorkItemWithDelayAsync()
{
return base.CanDequeueWithCancelledTokenAsync();
return base.CanQueueAndDequeueWorkItemWithDelayAsync();
}

[Fact]
public override Task CanQueueAndDequeueMultipleWorkItemsAsync()
public override Task CanUseQueueOptionsAsync()
{
return base.CanQueueAndDequeueMultipleWorkItemsAsync();
return base.CanUseQueueOptionsAsync();
}

[Fact]
public override Task WillWaitForItemAsync()
public override Task CanDiscardDuplicateQueueEntriesAsync()
{
return base.WillWaitForItemAsync();
return base.CanDiscardDuplicateQueueEntriesAsync();
}

[Fact]
public override Task DequeueWaitWillGetSignaledAsync()
public override Task CanDequeueWithCancelledTokenAsync()
{
return base.DequeueWaitWillGetSignaledAsync();
return base.CanDequeueWithCancelledTokenAsync();
}

[Fact]
public override Task CanUseQueueWorkerAsync()
public override Task CanDequeueEfficientlyAsync()
{
return base.CanUseQueueWorkerAsync();
return base.CanDequeueEfficientlyAsync();
}

[Fact]
public override Task CanHandleErrorInWorkerAsync()
public override Task CanResumeDequeueEfficientlyAsync()
{
return base.CanHandleErrorInWorkerAsync();
return base.CanResumeDequeueEfficientlyAsync();
}

[Fact(Skip = "Complete after timeout does not throw")]
public override Task WorkItemsWillTimeoutAsync()
[Fact]
public override Task CanQueueAndDequeueMultipleWorkItemsAsync()
{
return base.WorkItemsWillTimeoutAsync();
return base.CanQueueAndDequeueMultipleWorkItemsAsync();
}

[Fact(Skip = "Dequeue Time takes forever")]
[Fact]
public override Task WillNotWaitForItemAsync()
{
return base.WillNotWaitForItemAsync();
}

[Fact(Skip = "Dequeue Time takes forever")]
public override Task CanResumeDequeueEfficientlyAsync()
[Fact]
public override Task WillWaitForItemAsync()
{
return base.CanResumeDequeueEfficientlyAsync();
return base.WillWaitForItemAsync();
}

[Fact(Skip = "Dequeue Time takes forever")]
public override Task CanDequeueEfficientlyAsync()
[Fact]
public override Task DequeueWaitWillGetSignaledAsync()
{
return base.CanDequeueEfficientlyAsync();
return base.DequeueWaitWillGetSignaledAsync();
}

[Fact]
public override Task CanDequeueWithLockingAsync()
public override Task CanUseQueueWorkerAsync()
{
return base.CanDequeueWithLockingAsync();
return base.CanUseQueueWorkerAsync();
}

[Fact]
public override Task CanHaveMultipleQueueInstancesWithLockingAsync()
public override Task CanHandleErrorInWorkerAsync()
{
return base.CanHaveMultipleQueueInstancesWithLockingAsync();
return base.CanHandleErrorInWorkerAsync();
}

[Fact]
public override Task WorkItemsWillTimeoutAsync()
{
return base.WorkItemsWillTimeoutAsync();
}

[Fact]
Expand All @@ -138,6 +143,12 @@ public override Task CanHaveMultipleQueueInstancesAsync()
return base.CanHaveMultipleQueueInstancesAsync();
}

[Fact]
public override Task CanDelayRetryAsync()
{
return base.CanDelayRetryAsync();
}

[Fact]
public override Task CanRunWorkItemWithMetricsAsync()
{
Expand All @@ -162,6 +173,24 @@ public override Task CanCompleteQueueEntryOnceAsync()
return base.CanCompleteQueueEntryOnceAsync();
}

[Fact]
public override Task CanDequeueWithLockingAsync()
{
return base.CanDequeueWithLockingAsync();
}

[Fact]
public override Task CanHaveMultipleQueueInstancesWithLockingAsync()
{
return base.CanHaveMultipleQueueInstancesWithLockingAsync();
}

[Fact]
public override Task MaintainJobNotAbandon_NotWorkTimeOutEntry()
{
return base.MaintainJobNotAbandon_NotWorkTimeOutEntry();
}

[Fact]
public override Task VerifyRetryAttemptsAsync()
{
Expand All @@ -173,4 +202,10 @@ public override Task VerifyDelayedRetryAttemptsAsync()
{
return base.VerifyDelayedRetryAttemptsAsync();
}

[Fact]
public override Task CanHandleAutoAbandonInWorker()
{
return base.CanHandleAutoAbandonInWorker();
}
}
18 changes: 18 additions & 0 deletions tests/Foundatio.AzureStorage.Tests/Storage/AzureStorageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ public override Task CanGetFileListForSingleFolderAsync()
return base.CanGetFileListForSingleFolderAsync();
}

[Fact]
public override Task CanGetFileListForSingleFileAsync()
{
return base.CanGetFileListForSingleFileAsync();
}

[Fact]
public override Task CanGetPagedFileListForSingleFolderAsync()
{
Expand Down Expand Up @@ -131,6 +137,18 @@ public override Task WillRespectStreamOffsetAsync()
return base.WillRespectStreamOffsetAsync();
}

[Fact(Skip = "Write Stream is not yet supported")]
public override Task WillWriteStreamContentAsync()
{
return base.WillWriteStreamContentAsync();
}

[Fact]
public override Task CanSaveOverExistingStoredContent()

Check failure on line 147 in tests/Foundatio.AzureStorage.Tests/Storage/AzureStorageTests.cs

View workflow job for this annotation

GitHub Actions / build / build

'AzureStorageTests.CanSaveOverExistingStoredContent()': no suitable method found to override

Check failure on line 147 in tests/Foundatio.AzureStorage.Tests/Storage/AzureStorageTests.cs

View workflow job for this annotation

GitHub Actions / build / build

'AzureStorageTests.CanSaveOverExistingStoredContent()': no suitable method found to override
{
return base.CanSaveOverExistingStoredContent();
}

[Fact(Skip = "Skip until it's determined if it's possible to create empty folders, this was adapted from s3 tests")]
public virtual async Task WillNotReturnDirectoryInGetPagedFileListAsync()
{
Expand Down

0 comments on commit 602cb67

Please sign in to comment.