Skip to content

Commit

Permalink
chore(binding-opcua): improve/stabilize tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeintner committed Oct 13, 2023
1 parent b44448b commit 95ed97c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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
thingDescription.base = endpoint;
(thingDescription.opcua as unknown as { endpoint: string }).endpoint = endpoint;
});
after(async () => {
await opcuaServer.shutdown();
Expand Down

0 comments on commit 95ed97c

Please sign in to comment.