示例#1
0
    def setUpClass(cls):
        # Start dummy ADS Endpoint
        cls.test_server = AdsTestServer(logging=False)
        cls.test_server.start()

        # Endpoint AMS Address
        cls.endpoint = AmsAddr(TEST_SERVER_AMS_NET_ID, TEST_SERVER_AMS_PORT)

        # Open AMS Port
        ads.open_port()

        # wait a bit otherwise error might occur
        time.sleep(1)

        # NOTE: On a Windows machine, this route needs to be configured
        # within the router service for the tests to work.
        if platform_is_linux():
            ads.add_route(cls.endpoint, TEST_SERVER_IP_ADDRESS)
示例#2
0
    def setUpClass(cls):
        # Start dummy ADS Endpoint
        cls.test_server = AdsTestServer(logging=False)
        cls.test_server.start()

        # Endpoint AMS Address
        cls.endpoint = AmsAddr(TEST_SERVER_AMS_NET_ID, TEST_SERVER_AMS_PORT)

        # Open AMS Port
        ads.open_port()

        # wait a bit otherwise error might occur
        time.sleep(1)

        # NOTE: On a Windows machine, this route needs to be configured
        # within the router service for the tests to work.
        if platform_is_linux():
            ads.add_route(cls.endpoint, TEST_SERVER_IP_ADDRESS)