Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Add correlation ID for DbContext #16290

Merged
merged 1 commit into from
Jul 3, 2019

Conversation

ajcvickers
Copy link
Contributor

@ajcvickers ajcvickers commented Jun 26, 2019

Add Add correlation ID for DbContext like we have for DbCommand and DbConnection

Based on more feedback, now one ID and a lease number.

Fixes #16201

Better test coverage for interceptors and Diagnostics registered at the same time

Fixes #16352

@ajcvickers ajcvickers force-pushed the IDontCareIfTheWorldKnowsWhatMySecretsAre0626 branch from 2407886 to b50158d Compare June 26, 2019 22:45
@ajcvickers ajcvickers force-pushed the IDontCareIfTheWorldKnowsWhatMySecretsAre0626 branch from b50158d to cb0bc1b Compare June 29, 2019 15:51
@ajcvickers ajcvickers force-pushed the IDontCareIfTheWorldKnowsWhatMySecretsAre0626 branch from cb0bc1b to 2a3a0e1 Compare June 29, 2019 18:13
@ajcvickers
Copy link
Contributor Author

ajcvickers commented Jun 29, 2019

Added another commit that uses these IDs are part of improving testing for interceptors with/without DiagnosticsListener instances also registered. Fixes #16352

@ajcvickers
Copy link
Contributor Author

@AndriySvyryd Can you take another look at this--I made significant changes.

src/EFCore/DbContextIds.cs Outdated Show resolved Hide resolved
src/EFCore/DbContext.cs Outdated Show resolved Hide resolved
@@ -944,7 +944,7 @@ public async Task It_throws_object_disposed_exception(bool async)
await Assert.ThrowsAsync<ObjectDisposedException>(() => context.FindAsync(typeof(Random), 77).AsTask());

var methodCount = typeof(DbContext).GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly).Count();
var expectedMethodCount = 42;
var expectedMethodCount = 43;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😢

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆

@ajcvickers ajcvickers force-pushed the IDontCareIfTheWorldKnowsWhatMySecretsAre0626 branch from 6d7e175 to fd698fa Compare July 2, 2019 21:55
@ajcvickers ajcvickers requested review from divega and AndriySvyryd July 2, 2019 21:56
Copy link
Contributor

@divega divega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

src/EFCore/DbContext.cs Outdated Show resolved Hide resolved
@ajcvickers ajcvickers force-pushed the IDontCareIfTheWorldKnowsWhatMySecretsAre0626 branch from fd698fa to c55ee41 Compare July 2, 2019 22:53
…nd `DbConnection`

Based on more feedback, now one ID and a lease number.

Fixes #16201

Better test coverage for interceptors and Diagnostics registered at the same time

Fixes #16352
@ajcvickers ajcvickers force-pushed the IDontCareIfTheWorldKnowsWhatMySecretsAre0626 branch from c55ee41 to d036eb8 Compare July 2, 2019 22:57
@ajcvickers ajcvickers merged commit a5961cc into master Jul 3, 2019
@smitpatel smitpatel deleted the IDontCareIfTheWorldKnowsWhatMySecretsAre0626 branch July 4, 2019 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants