Skip to content

Commit

Permalink
For Arango 3.4, filter and exclude the StreamTransaction tests using …
Browse files Browse the repository at this point in the history
…Xunit Trait.
  • Loading branch information
DiscJockeyDJ committed Jun 15, 2021
1 parent 0e47589 commit 2ed04e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- run:
name: Test
command:
dotnet test -c Release
dotnet test -c Release --filter Transactions!=Stream

"test-arangodb-3_5":
working_directory: ~/arangodb-net-standard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public TransactionApiClientTest(TransactionApiClientTestFixture fixture)
/// Tests that the stream transaction gets aborted successfully when creating a document.
/// </summary>
[Fact]
[Trait("Transactions", "Stream")]
public async Task AbortTransaction_ShouldSucceed_WhenCreatingADocument()
{
// Setup the dummy document data.
Expand Down Expand Up @@ -83,6 +84,7 @@ public async Task AbortTransaction_ShouldSucceed_WhenCreatingADocument()
/// Tests that the stream transaction gets aborted successfully when replacing a document.
/// </summary>
[Fact]
[Trait("Transactions", "Stream")]
public async Task AbortTransaction_ShouldSucceed_WhenReplacingADocument()
{
// Setup the dummy document data.
Expand Down Expand Up @@ -140,6 +142,7 @@ public async Task AbortTransaction_ShouldSucceed_WhenReplacingADocument()
/// Tests that the stream transaction gets aborted successfully when deleting a document.
/// </summary>
[Fact]
[Trait("Transactions", "Stream")]
public async Task AbortTransaction_ShouldSucceed_WhenDeletingADocument()
{
// Setup the dummy document data.
Expand Down Expand Up @@ -195,6 +198,7 @@ public async Task AbortTransaction_ShouldSucceed_WhenDeletingADocument()
/// </summary>
/// <exception cref="ApiErrorException">With ErrorNum 1653 if the transaction cannot be aborted.</exception>
[Fact]
[Trait("Transactions", "Stream")]
public async Task AbortTransaction_ShouldThrowException_WhenTheTransactionCannotBeAborted()
{
// Setup the dummy document data.
Expand Down Expand Up @@ -242,6 +246,7 @@ public async Task AbortTransaction_ShouldThrowException_WhenTheTransactionCannot
/// </summary>
/// <exception cref="ApiErrorException">With ErrorNum 10 if the transaction is not found.</exception>
[Fact]
[Trait("Transactions", "Stream")]
public async Task AbortTransaction_ShouldThrowException_WhenTheTransactionIsNotFound()
{
var ex = await Assert.ThrowsAsync<ApiErrorException>(async () =>
Expand All @@ -257,6 +262,7 @@ public async Task AbortTransaction_ShouldThrowException_WhenTheTransactionIsNotF
/// Tests that when the existing collections are used to begin a transaction, the stream transaction is running.
/// </summary>
[Fact]
[Trait("Transactions", "Stream")]
public async Task BeginTransaction_ShouldSucceed()
{
// Setup the dummy document data.
Expand Down Expand Up @@ -305,6 +311,7 @@ public async Task BeginTransaction_ShouldSucceed()
/// </summary>
/// <exception cref="ApiErrorException">With ErrorNum 1203 if the collection is not found.</exception>
[Fact]
[Trait("Transactions", "Stream")]
public async Task BeginTransaction_ShouldThrowException_WhenReferring_To_A_NonExisting_Collection()
{
var ex = await Assert.ThrowsAsync<ApiErrorException>(async () =>
Expand All @@ -326,6 +333,7 @@ await _adb.Transaction.BeginTransaction<object>(new StreamTransactionBody
/// </summary>
/// <exception cref="ApiErrorException">With ErrorNum 10 if the transaction body is missing.</exception>
[Fact]
[Trait("Transactions", "Stream")]
public async Task BeginTransaction_ShouldThrowException_WhenTransactionBodyIsMissing()
{
var ex = await Assert.ThrowsAsync<ApiErrorException>(async () =>
Expand All @@ -340,6 +348,7 @@ await _adb.Transaction.BeginTransaction<object>(null)
/// Tests that the stream transaction gets committed successfully when creating a document.
/// </summary>
[Fact]
[Trait("Transactions", "Stream")]
public async Task CommitTransaction_ShouldSucceed_WhenCreatingADocument()
{
// Setup the dummy document data.
Expand Down Expand Up @@ -398,6 +407,7 @@ public async Task CommitTransaction_ShouldSucceed_WhenCreatingADocument()
/// Tests that the stream transaction gets committed successfully when replacing a document.
/// </summary>
[Fact]
[Trait("Transactions", "Stream")]
public async Task CommitTransaction_ShouldSucceed_WhenReplacingADocument()
{
// Setup the dummy document data.
Expand Down Expand Up @@ -455,6 +465,7 @@ public async Task CommitTransaction_ShouldSucceed_WhenReplacingADocument()
/// Tests that the stream transaction gets committed successfully when deleting a document.
/// </summary>
[Fact]
[Trait("Transactions", "Stream")]
public async Task CommitTransaction_ShouldSucceed_WhenDeletingADocument()
{
// Setup the dummy document data.
Expand Down Expand Up @@ -510,6 +521,7 @@ public async Task CommitTransaction_ShouldSucceed_WhenDeletingADocument()
/// </summary>
/// <exception cref="ApiErrorException">With ErrorNum 1653 if the transaction cannot be committed.</exception>
[Fact]
[Trait("Transactions", "Stream")]
public async Task CommitTransaction_ShouldThrowException_WhenTheTransactionCannotBeAborted()
{
// Setup the dummy document data.
Expand Down Expand Up @@ -557,6 +569,7 @@ public async Task CommitTransaction_ShouldThrowException_WhenTheTransactionCanno
/// </summary>
/// <exception cref="ApiErrorException">With ErrorNum 10 if the transaction is not found.</exception>
[Fact]
[Trait("Transactions", "Stream")]
public async Task CommitTransaction_ShouldThrowException_WhenTheTransactionIsNotFound()
{
var ex = await Assert.ThrowsAsync<ApiErrorException>(async () =>
Expand All @@ -572,6 +585,7 @@ public async Task CommitTransaction_ShouldThrowException_WhenTheTransactionIsNot
/// Tests that all running transactions are returned successfully.
/// </summary>
[Fact]
[Trait("Transactions", "Stream")]
public async Task GetAllRunningTransactions_ShouldSucceed()
{
// Begin the first transaction.
Expand Down Expand Up @@ -606,6 +620,7 @@ public async Task GetAllRunningTransactions_ShouldSucceed()
/// Tests that when there are no running transactions, an empty list of <see cref="Transaction"/> is returned.
/// </summary>
[Fact]
[Trait("Transactions", "Stream")]
public async Task GetAllRunningTransactions_ShouldSucceed_WhenThereAreNoRunningTransactions()
{
// Get all running transactions.
Expand All @@ -620,6 +635,7 @@ public async Task GetAllRunningTransactions_ShouldSucceed_WhenThereAreNoRunningT
/// Tests that the status of a transaction is returned successfully.
/// </summary>
[Fact]
[Trait("Transactions", "Stream")]
public async Task GetTransactionStatus_ShouldSucceed()
{
// Begin the transaction.
Expand All @@ -645,6 +661,7 @@ public async Task GetTransactionStatus_ShouldSucceed()
/// </summary>
/// <exception cref="ApiErrorException">With ErrorNum 10 if the transaction is not found.</exception>
[Fact]
[Trait("Transactions", "Stream")]
public async Task GetTransactionStatus_ShouldThrowException_WhenTheTransctionIdIsNotFound()
{
var ex = await Assert.ThrowsAsync<ApiErrorException>(async () =>
Expand Down

0 comments on commit 2ed04e2

Please sign in to comment.