Skip to content

Commit

Permalink
debug on file tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-grzesiowski committed Sep 25, 2024
1 parent 5614e6a commit e2b53b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
run: |
Copy-Item -Path "${{ github.workspace }}/sdk-specifications/features/access/*" -Destination "${{ github.workspace }}/src/UnitTests/AcceptanceTests/Features" -Recurse
cd ./UnitTests/AcceptanceTests
dotnet test --no-build --verbosity normal --logger "console;verbosity=detailed" --results-directory ./results
dotnet test --no-build --verbosity normal --logger "console;verbosity=detailed" --results-directory ./results --filter "FullyQualifiedName~WhenFileIsRequested"
- name: Upload acceptance tests reports
if: always()
uses: actions/upload-artifact@v4
Expand Down
10 changes: 9 additions & 1 deletion src/UnitTests/PubnubApi.Tests/WhenFileIsRequested.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ public static void ThenSendAndDeleteFileShouldReturnSuccess()
}));
var receivedMessage = messageReset.WaitOne(3 * 1000 * 60);

Assert.IsTrue(receivedMessage, "Send File Failed");

if (receivedMessage)
{
messageReset = new ManualResetEvent(false);
Expand All @@ -169,6 +171,8 @@ public static void ThenSendAndDeleteFileShouldReturnSuccess()
}));
receivedMessage = messageReset.WaitOne(2 * 1000 * 60);
}

Assert.IsTrue(receivedMessage, "List Files Failed");

if (receivedMessage)
{
Expand All @@ -187,6 +191,8 @@ public static void ThenSendAndDeleteFileShouldReturnSuccess()
}));
receivedMessage = messageReset.WaitOne(2 * 1000 * 60);
}

Assert.IsTrue(receivedMessage, "Download File Failed");

if (receivedMessage)
{
Expand All @@ -204,6 +210,8 @@ public static void ThenSendAndDeleteFileShouldReturnSuccess()
}));
receivedMessage = messageReset.WaitOne(2 * 1000 * 60);
}

Assert.IsTrue(receivedMessage, "Delete File Failed");

var receivedEvent = false;
if (receivedMessage)
Expand All @@ -214,7 +222,7 @@ public static void ThenSendAndDeleteFileShouldReturnSuccess()
pubnub.Destroy();
pubnub.PubnubUnitTest = null;
pubnub = null;
Assert.IsTrue(receivedEvent);
Assert.IsTrue(receivedEvent, "Receiving file event failed.");
Assert.IsTrue(receivedMessage, "WhenFileIsRequested -> TheSendFileShouldReturnSuccess failed.");
}

Expand Down

0 comments on commit e2b53b5

Please sign in to comment.