From e6d823e3bb3f6b1701c5424d116b82162d58f212 Mon Sep 17 00:00:00 2001 From: gaoxi785 Date: Thu, 3 Aug 2023 16:22:22 +0800 Subject: [PATCH] Mdns_off Signed-off-by: gaoxi785 --- .../dns/src/main/js/test/NetworkManagerMdns.test.js | 6 ++++++ .../main/js/test/NetworkManagerTCPSocketServer.test.js | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/telephony/telephonyjstest/netmanager_base/dns/src/main/js/test/NetworkManagerMdns.test.js b/telephony/telephonyjstest/netmanager_base/dns/src/main/js/test/NetworkManagerMdns.test.js index 52b3204a4..ca40f97aa 100644 --- a/telephony/telephonyjstest/netmanager_base/dns/src/main/js/test/NetworkManagerMdns.test.js +++ b/telephony/telephonyjstest/netmanager_base/dns/src/main/js/test/NetworkManagerMdns.test.js @@ -809,6 +809,7 @@ export default function NetworkManagerMdnsTest() { }, delayTime) } }); + discoveryService.off("discoveryStart"); }); @@ -851,6 +852,7 @@ export default function NetworkManagerMdnsTest() { }, delayTime) } }); + discoveryService.off("discoveryStop"); }); /** @@ -892,6 +894,7 @@ export default function NetworkManagerMdnsTest() { }, delayTime) } }); + discoveryService.off("discoveryStart"); }); /** @@ -933,6 +936,7 @@ export default function NetworkManagerMdnsTest() { }, delayTime) } }); + discoveryService.off("discoveryStop"); }); /** @@ -974,6 +978,7 @@ export default function NetworkManagerMdnsTest() { }, delayTime) } }); + discoveryService.off("serviceFound"); }); /** @@ -1012,6 +1017,7 @@ export default function NetworkManagerMdnsTest() { }, delayTime) } }); + discoveryService.off("serviceLost"); }); /** diff --git a/telephony/telephonyjstest/netmanager_base/socket/src/main/js/test/NetworkManagerTCPSocketServer.test.js b/telephony/telephonyjstest/netmanager_base/socket/src/main/js/test/NetworkManagerTCPSocketServer.test.js index 2e11cea2d..f1095b947 100644 --- a/telephony/telephonyjstest/netmanager_base/socket/src/main/js/test/NetworkManagerTCPSocketServer.test.js +++ b/telephony/telephonyjstest/netmanager_base/socket/src/main/js/test/NetworkManagerTCPSocketServer.test.js @@ -108,7 +108,7 @@ export default function NetTCPSocketServerTest() { done(); } catch (error) { console.info(`${caseName} catch error, expect error: [${error.code}, ${error.message}]`); - expect(error.code).assertEqual(401); + expect(error.code == 401).assertTrue(); done(); } }); @@ -172,7 +172,7 @@ export default function NetTCPSocketServerTest() { done(); } catch (error) { console.info(`${caseName} catch error, expect error: [${error.code}, ${error.message}]`); - expect(error.code).assertEqual(401); + expect(error.code == 401).assertTrue(); done(); return; } @@ -225,7 +225,7 @@ export default function NetTCPSocketServerTest() { done(); } catch (error) { console.info(`${caseName} catch error, expect error: [${error.code}, ${error.message}]`); - expect(error.code).assertEqual(401); + expect(error.code == 401).assertTrue(); done(); return; } @@ -690,7 +690,7 @@ export default function NetTCPSocketServerTest() { }); } catch (error) { console.info(`${caseName} catch error, expect error: [${error.code}, ${error.message}]`); - ExpectFalse(); + expect(error.code == 401).assertTrue(); done(); return; } @@ -1305,7 +1305,7 @@ export default function NetTCPSocketServerTest() { done(); } catch (error) { console.info(`${caseName} catch err, expect err: [${error.code}, ${error.message}]`); - expect(error.code).assertEqual(401); + expect(error.code == 401).assertTrue(); done(); return; } -- GitLab