Skip to content

Commit efc5024

Browse files
authored
Per conversation with Billy, let's remove the release gate for unreliable acceptance tests. (#405)
1 parent 0bed1e1 commit efc5024

14 files changed

+143
-282
lines changed

.github/workflows/build-validation.yml

+54-54
Original file line numberDiff line numberDiff line change
@@ -47,57 +47,57 @@ jobs:
4747
run: |
4848
dotnet test --no-restore --verbosity normal --filter "Category!=Acceptance"
4949
50-
acceptance-tests:
51-
needs: build
52-
runs-on: ubuntu-latest
53-
54-
steps:
55-
- uses: actions/checkout@main
56-
- name: Setup .NET
57-
uses: actions/setup-dotnet@main
58-
with:
59-
dotnet-version: |
60-
8.0.x
61-
62-
- name: Install dependencies
63-
run: dotnet restore
64-
65-
- name: Build
66-
run: |
67-
dotnet build --configuration Release --no-restore
68-
69-
- name: Prune databases
70-
working-directory: ./tools/CosmosTestHelper
71-
env:
72-
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
73-
run: dotnet run
74-
75-
- name: Test Functions
76-
env:
77-
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
78-
run: |
79-
dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type!=Container&Type!=CosmosEventSourcing"
80-
81-
- name: Prune databases
82-
working-directory: ./tools/CosmosTestHelper
83-
env:
84-
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
85-
run: dotnet run
86-
87-
- name: Test Cosmos Event Sourcing
88-
env:
89-
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
90-
run: |
91-
dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=CosmosEventSourcing"
92-
93-
- name: Prune databases
94-
working-directory: ./tools/CosmosTestHelper
95-
env:
96-
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
97-
run: dotnet run
98-
99-
- name: Test Container Creation
100-
env:
101-
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
102-
run: |
103-
dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=Container"
50+
# acceptance-tests:
51+
# needs: build
52+
# runs-on: ubuntu-latest
53+
54+
# steps:
55+
# - uses: actions/checkout@main
56+
# - name: Setup .NET
57+
# uses: actions/setup-dotnet@main
58+
# with:
59+
# dotnet-version: |
60+
# 8.0.x
61+
62+
# - name: Install dependencies
63+
# run: dotnet restore
64+
65+
# - name: Build
66+
# run: |
67+
# dotnet build --configuration Release --no-restore
68+
69+
# - name: Prune databases
70+
# working-directory: ./tools/CosmosTestHelper
71+
# env:
72+
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
73+
# run: dotnet run
74+
75+
# - name: Test Functions
76+
# env:
77+
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
78+
# run: |
79+
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type!=Container&Type!=CosmosEventSourcing"
80+
81+
# - name: Prune databases
82+
# working-directory: ./tools/CosmosTestHelper
83+
# env:
84+
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
85+
# run: dotnet run
86+
87+
# - name: Test Cosmos Event Sourcing
88+
# env:
89+
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
90+
# run: |
91+
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=CosmosEventSourcing"
92+
93+
# - name: Prune databases
94+
# working-directory: ./tools/CosmosTestHelper
95+
# env:
96+
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
97+
# run: dotnet run
98+
99+
# - name: Test Container Creation
100+
# env:
101+
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
102+
# run: |
103+
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=Container"

.github/workflows/codeql-analysis.yml

-80
This file was deleted.

.github/workflows/nuget-publish.yml

+52-52
Original file line numberDiff line numberDiff line change
@@ -24,61 +24,61 @@ jobs:
2424
run: |
2525
dotnet test --no-restore --verbosity normal --filter "Category!=Acceptance"
2626
27-
acceptance_tests:
28-
runs-on: ubuntu-latest
29-
steps:
30-
- uses: actions/checkout@main
31-
- name: Setup .NET
32-
uses: actions/setup-dotnet@main
33-
with:
34-
dotnet-version: |
35-
8.0.x
36-
- name: Install dependencies
37-
run: dotnet restore
38-
39-
- name: Build
40-
run: |
41-
dotnet build --configuration Release --no-restore
42-
43-
- name: Prune databases
44-
working-directory: ./tools/CosmosTestHelper
45-
env:
46-
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
47-
run: dotnet run
48-
49-
- name: Test Functions
50-
env:
51-
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
52-
run: |
53-
dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type!=Container&Type!=CosmosEventSourcing"
54-
55-
- name: Prune databases
56-
working-directory: ./tools/CosmosTestHelper
57-
env:
58-
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
59-
run: dotnet run
60-
61-
- name: Test Cosmos Event Sourcing
62-
env:
63-
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
64-
run: |
65-
dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=CosmosEventSourcing"
66-
67-
- name: Prune databases
68-
working-directory: ./tools/CosmosTestHelper
69-
env:
70-
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
71-
run: dotnet run
72-
73-
- name: Test Container Creation
74-
env:
75-
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
76-
run: |
77-
dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=Container"
27+
# acceptance_tests:
28+
# runs-on: ubuntu-latest
29+
# steps:
30+
# - uses: actions/checkout@main
31+
# - name: Setup .NET
32+
# uses: actions/setup-dotnet@main
33+
# with:
34+
# dotnet-version: |
35+
# 8.0.x
36+
# - name: Install dependencies
37+
# run: dotnet restore
38+
39+
# - name: Build
40+
# run: |
41+
# dotnet build --configuration Release --no-restore
42+
43+
# - name: Prune databases
44+
# working-directory: ./tools/CosmosTestHelper
45+
# env:
46+
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
47+
# run: dotnet run
48+
49+
# - name: Test Functions
50+
# env:
51+
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
52+
# run: |
53+
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type!=Container&Type!=CosmosEventSourcing"
54+
55+
# - name: Prune databases
56+
# working-directory: ./tools/CosmosTestHelper
57+
# env:
58+
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
59+
# run: dotnet run
60+
61+
# - name: Test Cosmos Event Sourcing
62+
# env:
63+
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
64+
# run: |
65+
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=CosmosEventSourcing"
66+
67+
# - name: Prune databases
68+
# working-directory: ./tools/CosmosTestHelper
69+
# env:
70+
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
71+
# run: dotnet run
72+
73+
# - name: Test Container Creation
74+
# env:
75+
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
76+
# run: |
77+
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=Container"
7878

7979
deploy:
8080
needs:
81-
- acceptance_tests
81+
# - acceptance_tests
8282
- unit_tests
8383
if: github.event.base_ref == 'refs/heads/main'
8484
runs-on: ubuntu-latest

tests/Microsoft.Azure.CosmosEventSourcingAcceptanceTests/AcceptanceTests.Setup.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public AcceptanceTests(ITestOutputHelper outputHelper)
114114
_changeFeedService = _provider.GetRequiredService<IChangeFeedService>();
115115
}
116116

117-
[Fact]
117+
[Fact(Skip = "In discussing this with Bill, we've decided that this might not be reliable enough to justify having it be a release gate.")]
118118
public async Task CosmosEventSourcingTest()
119119
{
120120
ICosmosClientProvider clientProvider =

tests/Microsoft.Azure.CosmosRepositoryAcceptanceTests/ChangeFeed/RatingByCategoryChangeFeedProcessor.cs

+5-11
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,12 @@
33

44
namespace Microsoft.Azure.CosmosRepositoryAcceptanceTests.ChangeFeed;
55

6-
public class RatingByCategoryChangeFeedProcessor : IItemChangeFeedProcessor<Rating>
6+
public class RatingByCategoryChangeFeedProcessor(
7+
ILogger<RatingByCategoryChangeFeedProcessor> logger,
8+
IRepository<RatingByCategory> ratingByCategoryRepository) : IItemChangeFeedProcessor<Rating>
79
{
8-
private readonly ILogger<RatingByCategoryChangeFeedProcessor> _logger;
9-
private readonly IRepository<RatingByCategory> _ratingByCategoryRepository;
10-
11-
public RatingByCategoryChangeFeedProcessor(
12-
ILogger<RatingByCategoryChangeFeedProcessor> logger,
13-
IRepository<RatingByCategory> ratingByCategoryRepository)
14-
{
15-
_logger = logger;
16-
_ratingByCategoryRepository = ratingByCategoryRepository;
17-
}
10+
private readonly ILogger<RatingByCategoryChangeFeedProcessor> _logger = logger;
11+
private readonly IRepository<RatingByCategory> _ratingByCategoryRepository = ratingByCategoryRepository;
1812

1913
public async ValueTask HandleAsync(Rating rating, CancellationToken cancellationToken)
2014
{

tests/Microsoft.Azure.CosmosRepositoryAcceptanceTests/ChangeFeedBasicTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public ChangeFeedBasicTests(ITestOutputHelper testOutputHelper) : base(testOutpu
4343
_changeFeedService = _provider.GetRequiredService<IChangeFeedService>();
4444
}
4545

46-
[Fact]
46+
[Fact(Skip = "In discussing this with Bill, we've decided that this might not be reliable enough to justify having it be a release gate.")]
4747
public async Task Create_Rating_For_Product_Is_Replicated_To_Be_Partitioned_By_Category()
4848
{
4949
try

tests/Microsoft.Azure.CosmosRepositoryAcceptanceTests/DisabledStrictTypeCheckingTests.cs

+3-10
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,13 @@ namespace Microsoft.Azure.CosmosRepositoryAcceptanceTests;
66
/// <summary>
77
/// Required as item options are cached in a static collection, the key is the Type
88
/// </summary>
9-
public class DisabledOffer : Offer
9+
public class DisabledOffer(string offerType, string createdBy) : Offer(offerType, createdBy)
1010
{
11-
public DisabledOffer(string offerType, string createdBy) : base(offerType, createdBy)
12-
{
13-
}
1411
}
1512

1613
[Trait("Category", "Acceptance")]
1714
[Trait("Type", "Container")]
18-
public class DisabledStrictTypeCheckingTests : CosmosRepositoryAcceptanceTest
15+
public class DisabledStrictTypeCheckingTests(ITestOutputHelper testOutputHelper) : CosmosRepositoryAcceptanceTest(testOutputHelper, DisabledStrictTypeCheckingOptions)
1916
{
2017
private const string OffersDatabaseName = "offers";
2118
private const string OffersContainerName = "offers";
@@ -50,7 +47,7 @@ public class DisabledStrictTypeCheckingTests : CosmosRepositoryAcceptanceTest
5047
});
5148
};
5249

53-
[Fact]
50+
[Fact(Skip = "In discussing this with Bill, we've decided that this might not be reliable enough to justify having it be a release gate.")]
5451
public async Task GetAsync_BaseClassSetupWithoutStrictTypeChecking_ReturnSubClassesOnlyDeserializedIntoBaseType()
5552
{
5653
try
@@ -88,8 +85,4 @@ public async Task GetAsync_BaseClassSetupWithoutStrictTypeChecking_ReturnSubClas
8885
await GetClient().UseClientAsync(PruneDatabases);
8986
}
9087
}
91-
92-
public DisabledStrictTypeCheckingTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper, DisabledStrictTypeCheckingOptions)
93-
{
94-
}
9588
}

0 commit comments

Comments
 (0)