-
Notifications
You must be signed in to change notification settings - Fork 445
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. I think that if possible we should reframe the VerifiableServerLoggedTest
class into a base class for all functional tests that require a server. The logging is just a useful side-feature of that component.
Top-level suggestions:
- Rename ServerFixture to "FunctionalTestServer" or something similar
- Rename VerifiableServerLoggedTest to ServerTestBase or similar
And a couple comments inline
@@ -44,6 +43,20 @@ public VerifiableServerLoggedTest(ServerFixture serverFixture, ITestOutputHelper | |||
}; | |||
} | |||
|
|||
public IDisposable StartVerifiableServerLog<T>(out ILoggerFactory loggerFactory, out ServerFixture<T> serverFixture, LogLevel minLogLevel, [CallerMemberName] string testName = null, Func<WriteContext, bool> expectedErrorsFilter = null) where T : class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public IDisposable StartVerifiableServerLog<T>(out ILoggerFactory loggerFactory, out ServerFixture<T> serverFixture, LogLevel minLogLevel, [CallerMemberName] string testName = null, Func<WriteContext, bool> expectedErrorsFilter = null) where T : class | |
public IDisposable StartServer<T>(out ILoggerFactory loggerFactory, out ServerFixture<T> serverFixture, LogLevel minLogLevel, [CallerMemberName] string testName = null, Func<WriteContext, bool> expectedErrorsFilter = null) where T : class |
return new MultiDisposable(serverFixture, disposable); | ||
} | ||
|
||
public IDisposable StartVerifiableServerLog<T>(out ILoggerFactory loggerFactory, out ServerFixture<T> serverFixture, [CallerMemberName] string testName = null, Func<WriteContext, bool> expectedErrorsFilter = null) where T : class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public IDisposable StartVerifiableServerLog<T>(out ILoggerFactory loggerFactory, out ServerFixture<T> serverFixture, [CallerMemberName] string testName = null, Func<WriteContext, bool> expectedErrorsFilter = null) where T : class | |
public IDisposable StartServer<T>(out ILoggerFactory loggerFactory, out ServerFixture<T> serverFixture, [CallerMemberName] string testName = null, Func<WriteContext, bool> expectedErrorsFilter = null) where T : class |
Looking snazzy AF. Can you get some rough test run-time comparison numbers from before and after (with a little bit of warm-up)? |
Microsoft.AspNetCore.SignalR.Client.FunctionalTestsBefore: Core 59 seconds, Full Framework 1 minute |
Seems super weird that it's faster after this change... I'd expect it to be slightly slower or about the same... Not going to block the merge on that though. |
It has to be parallelization |
@muratg FYI, test only changes for release/2.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
Of course! Missed that part ;) |
Lets hash out the design.
Currently is working and an example of test log is below: