Skip to content

Commit

Permalink
chore(binding-opcua): improve/stabilize tests (#1120)
Browse files Browse the repository at this point in the history
* chore(binding-opcua): improve/stabilize tests

see #1072

* fix typo

Co-authored-by: Jan Romann <[email protected]>

---------

Co-authored-by: Jan Romann <[email protected]>
  • Loading branch information
danielpeintner and JKRhb authored Oct 13, 2023
1 parent d6fdbdf commit 2e6fc09
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}`);

// adjust 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 2e6fc09

Please sign in to comment.