Skip to content

Commit

Permalink
[tests] call server/resetCache between display test cases for xml too (
Browse files Browse the repository at this point in the history
…#11937)

* [tests] call server/resetCache between display test cases for xml too

* [tests] Also add timeout in case of GC run, and use static local
  • Loading branch information
kLabz authored Jan 22, 2025
1 parent 0b2b0da commit d88bb90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/display/src/RpcDisplayTestCase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class RpcDisplayTestCase implements utest.ITest {

@:timeout(3000)
public function setup() {
var methodArgs = {method: Methods.ResetCache, id: 1, params: {}};
static var methodArgs = {method: Methods.ResetCache, id: 1, params: {}};
var args = ['--display', Json.stringify(methodArgs)];
BaseDisplayTestContext.runHaxe(args);
}
Expand Down
7 changes: 7 additions & 0 deletions tests/display/src/XmlDisplayTestCase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ class XmlDisplayTestCase implements utest.ITest {

public function new() {}

@:timeout(3000)
public function setup() {
static var methodArgs = {method: haxe.display.Protocol.Methods.ResetCache, id: 1, params: {}};
var args = ['--display', haxe.Json.stringify(methodArgs)];
BaseDisplayTestContext.runHaxe(args);
}

// api
inline function pos(name)
return ctx.pos(name);
Expand Down

0 comments on commit d88bb90

Please sign in to comment.