Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Issue 251563002: Mark analysis server tests as slow under dart2js (TBR). (Closed)

Created:
6 years, 8 months ago by Paul Berry
Modified:
6 years, 8 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Mark analysis server tests as slow under dart2js (TBR). Because of the use of mocking, analysis server tests are very slow with dart2js. Go ahead and let them timeout. Committed: https://code.google.com/p/dart/source/detail?r=35385

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -0 lines) Patch
M pkg/pkg.status View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Paul Berry
Committed patchset #1 manually as r35385 (presubmit successful).
6 years, 8 months ago (2014-04-24 17:27:13 UTC) #1
Paul Berry
6 years, 8 months ago (2014-04-24 17:27:53 UTC) #2
scheglov
lgmt
6 years, 8 months ago (2014-04-24 17:31:15 UTC) #3
ahe
6 years, 8 months ago (2014-04-24 18:02:12 UTC) #4
Message was sent while issue was closed.
We try to avoid using "timeout" as it gives absolutely no test coverage and just
waste CPU cycles.

Instead, you should:

* not use mock, or

* use @MirrorsUsed to reduce the amount code to be compiled.

This is the current status of how much extra code is included due to use of
"mock", and where you could add @MirrorsUsed:

pkg/analysis_server/test/analysis_server_test.dart:
Hint: 5398 methods retained for use by dart:mirrors out of 12432 total methods
(43%).

.../packages/mock/src/mock.dart:9:1:
Info: This import is not annotated with @MirrorsUsed, which may lead to
unnecessarily large generated code.
Try adding '@MirrorsUsed(...)' as described at https://goo.gl/Akrrog.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
pkg/analysis_server/test/mocks.dart:9:1:
Info: This import is not annotated with @MirrorsUsed, which may lead to
unnecessarily large generated code.
Try adding '@MirrorsUsed(...)' as described at https://goo.gl/Akrrog.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^

I think this should do the trick:

diff --git a/dart/pkg/analysis_server/test/mocks.dart
b/dart/pkg/analysis_server/test/mocks.dart
index 1b66262..8712032 100644
--- a/dart/pkg/analysis_server/test/mocks.dart
+++ b/dart/pkg/analysis_server/test/mocks.dart
@@ -6,6 +6,8 @@ library mocks;
 
 import 'dart:async';
 import 'dart:io';
+
+@MirrorsUsed(targets: 'mocks', override: '*')
 import 'dart:mirrors';
 
 import 'package:analyzer/src/generated/engine.dart';

If it still takes too long to compile, try using "slow" instead of "timeout".
Normally, we want to avoid using "slow" as well, but when you have a test of
something really huge (like dart2js or the analyzer) sometimes you cannot get
the compile times down.

Powered by Google App Engine
This is Rietveld 408576698