Closed laurentsenta closed 2 years ago
Adding the signal event at the end of the ping-pong test will make it pass
runenv.recordMessage("ping pong");
await pingPong("10", 20, 35);
// here vvv
await client.signalEvent({
success_event: {
group: runenv.runParams.testGroupId,
},
});
} finally {
client.close();
if (server) server.close();
if (socket) socket.destroy();
}
Self assigning, I'll implement a fix for this but @hacdias if you have some advice on this, I'm sure that would help me a lot
I'm trying to run the
example-js
in the main testground repo but the job outcome is "failed" despite the test running successfully, Details in: https://github.com/testground/testground/issues/1303I'm still getting started with the testground architecture, it looks like we expect the test to send a success signal to the sync service:
https://github.com/testground/sdk-js/blob/3124743eb2d8cac08e7697bc1d051c2d4dc18a58/src/runtime/events.js#L59-L61
but this emitter is initialized with null: https://github.com/testground/sdk-js/blob/3124743eb2d8cac08e7697bc1d051c2d4dc18a58/src/runtime/index.js#L36-L50
and never set: https://github.com/testground/sdk-js/search?q=setSignalEmitter https://github.com/testground/testground/search?q=setSignalEmitter
In the case of the go example we use a helper function that initializes the signal emitter: https://github.com/testground/testground/blob/master/plans/network/main.go#L9 https://github.com/testground/sdk-go/blob/d78f61eccaa37b0d941f98650bce5dbb8fd7b7f1/run/invoker.go#L169-L173