Skip to content

Commit 89d06d6

Browse files
authored
Update assumptions in LoggingRPCSuite and fix missing class name (#9955)
CollectorChrome was renamed about 10 years ago, and sourcemaps are well supported now, so this test can be adjusted to always handle the optimized case. Fixes the recent build failure.
1 parent 468bf52 commit 89d06d6

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

user/test/com/google/gwt/user/LoggingRPCSuite.gwt.xml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,16 @@
1919
<servlet path='/loggingrpc'
2020
class='com.google.gwt.user.server.rpc.LoggingRPCTestServiceImpl' />
2121

22+
<!-- Enabling sourcemaps will stop JUnit.gwt.xml from using emulated stack mode -->
2223
<set-property name="compiler.useSourceMaps" value="true"/>
24+
<!-- This is the default, set explicitly to ensure we are set correctly -->
25+
<set-property name="compiler.stackMode" value="native"/>
2326

24-
25-
<!-- Turn off emulation to test non-sourcemap mode -->
26-
<set-property name="compiler.stackMode" value="native"/>
27-
<!-- when Chrome is enabled, turn off stack trace emulation -->
28-
<set-property name="compiler.stackMode" value="strip">
29-
<when-property-is name="user.agent" value="safari"/>
30-
</set-property>
31-
32-
<!-- when stack trace stripping is enabled, we need to replace the Null collector
33-
with one that does something -->
34-
<replace-with class="com.google.gwt.core.client.impl.StackTraceCreator.CollectorChrome">
27+
<!-- When stack trace stripping is enabled, we need to replace the Null collector with one that
28+
does something. Not currently in use, see https://github.com/gwtproject/gwt/issues/9956 for
29+
more information. -->
30+
<replace-with class="com.google.gwt.core.client.impl.StackTraceCreator.CollectorModern">
3531
<when-type-is class="com.google.gwt.core.client.impl.StackTraceCreator.Collector" />
36-
<when-property-is name="compiler.useSourceMaps" value="true" />
32+
<when-property-is name="compiler.stackMode" value="strip" />
3733
</replace-with>
38-
3934
</module>

user/test/com/google/gwt/user/client/rpc/LoggingRPCTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public void onSuccess(LogRecord record) {
179179
break;
180180
}
181181
}
182-
assertTrue(found);
182+
assertTrue("expected frame found in stack trace", found);
183183
finishTest();
184184
}
185185
});

0 commit comments

Comments
 (0)