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

chore(binding-opcua): improve/stabilize tests #1120

Merged
merged 2 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 4 additions & 3 deletions packages/binding-opcua/test/client-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ describe("OPCUA Client", function () {
const codecSerDes = ContentSerdes.get();
codecSerDes.addCodec(new OpcuaJSONCodec());
});
after(async () => {
await opcuaServer.shutdown();
});

let client: OPCUAProtocolClient;
before(async function () {
Expand All @@ -51,6 +48,10 @@ describe("OPCUA Client", function () {
after(async () => {
await client.stop();
});
// server shall stop after client
after(async () => {
await opcuaServer.shutdown();
});

[
// 0
Expand Down
4 changes: 4 additions & 0 deletions packages/binding-opcua/test/full-opcua-thing-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ describe("Full OPCUA Thing Test", () => {
opcuaServer = await startServer();
endpoint = opcuaServer.getEndpointUrl();
debug(`endpoint = ${endpoint}`);

// ajdust TD to endpoint
danielpeintner marked this conversation as resolved.
Show resolved Hide resolved
thingDescription.base = endpoint;
(thingDescription.opcua as unknown as { endpoint: string }).endpoint = endpoint;
});
after(async () => {
await opcuaServer.shutdown();
Expand Down