forked from qt-creator/qt-creator
UnitTests: Fix names and disable slow tests by default
Slow and very slow tests have now their own test category. We add SlowTest for tests which are slower than ~5ms and VerySlowTest if they are slower than ~100ms. They are disabled them by "-*SlowTest.*". If you have a faster machine than most developers simply try lower values. The aim is that most developers can execute the tests in under ~2s. In the long run we should use dependency breaking and data sharing to reduce the count of the slow tests. Change-Id: I8578071258d7f89b2052709f3dd526ced811483f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -43,6 +43,8 @@ protected:
|
||||
ClangBackEnd::UpdateDocumentAnnotationsJob job;
|
||||
};
|
||||
|
||||
using UpdateDocumentAnnotationsJobSlowTest = UpdateDocumentAnnotationsJob;
|
||||
|
||||
TEST_F(UpdateDocumentAnnotationsJob, PrepareAsyncRun)
|
||||
{
|
||||
job.setContext(jobContext);
|
||||
@@ -50,7 +52,7 @@ TEST_F(UpdateDocumentAnnotationsJob, PrepareAsyncRun)
|
||||
ASSERT_TRUE(job.prepareAsyncRun());
|
||||
}
|
||||
|
||||
TEST_F(UpdateDocumentAnnotationsJob, RunAsync)
|
||||
TEST_F(UpdateDocumentAnnotationsJobSlowTest, RunAsync)
|
||||
{
|
||||
job.setContext(jobContext);
|
||||
job.prepareAsyncRun();
|
||||
@@ -60,7 +62,7 @@ TEST_F(UpdateDocumentAnnotationsJob, RunAsync)
|
||||
ASSERT_TRUE(waitUntilJobFinished(job));
|
||||
}
|
||||
|
||||
TEST_F(UpdateDocumentAnnotationsJob, SendAnnotations)
|
||||
TEST_F(UpdateDocumentAnnotationsJobSlowTest, SendAnnotations)
|
||||
{
|
||||
job.setContext(jobContextWithMockClient);
|
||||
job.prepareAsyncRun();
|
||||
@@ -71,7 +73,7 @@ TEST_F(UpdateDocumentAnnotationsJob, SendAnnotations)
|
||||
ASSERT_TRUE(waitUntilJobFinished(job));
|
||||
}
|
||||
|
||||
TEST_F(UpdateDocumentAnnotationsJob, DontSendAnnotationsIfDocumentWasClosed)
|
||||
TEST_F(UpdateDocumentAnnotationsJobSlowTest, DontSendAnnotationsIfDocumentWasClosed)
|
||||
{
|
||||
job.setContext(jobContextWithMockClient);
|
||||
job.prepareAsyncRun();
|
||||
@@ -83,7 +85,7 @@ TEST_F(UpdateDocumentAnnotationsJob, DontSendAnnotationsIfDocumentWasClosed)
|
||||
ASSERT_TRUE(waitUntilJobFinished(job));
|
||||
}
|
||||
|
||||
TEST_F(UpdateDocumentAnnotationsJob, DontSendAnnotationsIfDocumentRevisionChanged)
|
||||
TEST_F(UpdateDocumentAnnotationsJobSlowTest, DontSendAnnotationsIfDocumentRevisionChanged)
|
||||
{
|
||||
job.setContext(jobContextWithMockClient);
|
||||
job.prepareAsyncRun();
|
||||
@@ -95,7 +97,7 @@ TEST_F(UpdateDocumentAnnotationsJob, DontSendAnnotationsIfDocumentRevisionChange
|
||||
ASSERT_TRUE(waitUntilJobFinished(job));
|
||||
}
|
||||
|
||||
TEST_F(UpdateDocumentAnnotationsJob, UpdatesTranslationUnit)
|
||||
TEST_F(UpdateDocumentAnnotationsJobSlowTest, UpdatesTranslationUnit)
|
||||
{
|
||||
const TimePoint timePointBefore = document.lastProjectPartChangeTimePoint();
|
||||
const QSet<Utf8String> dependendOnFilesBefore = document.dependedFilePaths();
|
||||
|
||||
Reference in New Issue
Block a user