Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix close connection call browser process controller #3107

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions js/test/Common/ControllerI.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@ class ProcessI extends Test.Common.Process {
}

class ProcessControllerI extends Test.Common.BrowserProcessController {
constructor(clientOutput, serverOutput, useWorker, scripts) {
constructor(clientOutput, serverOutput, useWorker) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts was no longer used, a left over from the 3.7 setup.

super();
this._clientOutput = clientOutput;
this._serverOutput = serverOutput;
this._useWorker = useWorker;
this._scripts = scripts;
}

async start(testSuite, exe, args, current) {
Expand Down Expand Up @@ -114,12 +113,12 @@ class ProcessControllerI extends Test.Common.BrowserProcessController {
}

redirect(url, current) {
current.con.close(Ice.ConnectionClose.Gracefully);
current.con.close();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We forget to fix this when we remove ConnectionClose enum, browser tests has been broken for a while.

Would be worth to investigate if we can run them in CI.

window.location.href = url;
}
}

export async function runController(clientOutput, serverOutput, scripts) {
export async function runController(clientOutput, serverOutput) {
class Output {
constructor(output) {
this.output = output;
Expand Down Expand Up @@ -181,7 +180,7 @@ export async function runController(clientOutput, serverOutput, scripts) {
const registry = Test.Common.ProcessControllerRegistryPrx.uncheckedCast(comm.stringToProxy(str));
const adapter = await comm.createObjectAdapter("");
const ident = new Ice.Identity("ProcessController", "Browser");
const processController = adapter.add(new ProcessControllerI(out, serverOut, worker, scripts), ident);
const processController = adapter.add(new ProcessControllerI(out, serverOut, worker), ident);
registerProcessController(adapter, registry, processController);
} catch (ex) {
out.writeLine("unexpected exception while creating controller:\n" + ex.toString());
Expand Down