Skip to content

Commit

Permalink
Minor updates to bacnet and modbus_tk tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidraker committed Mar 28, 2024
1 parent 1924bdd commit 50290af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def scrape_all(self, agent, device_name):
return agent.vip.rpc.call(PLATFORM_DRIVER, 'scrape_all', device_name)\
.get(timeout=10)

@pytest.mark.xfail(is_running_in_container(), reason='Fails to set points on this test setup, only in Docker.')
@pytest.mark.skip('This test has been unreliable.')
def test_scrape_all(self, agent):
for key in registers_dict.keys():
self.set_point(agent, 'modbus_tk', key, registers_dict[key])
Expand Down
10 changes: 9 additions & 1 deletion services/core/PlatformDriverAgent/tests/test_bacnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,15 @@ def test_get_point_should_succeed(bacnet_test_agent):

@pytest.fixture(scope="module")
def bacnet_proxy_agent(volttron_instance):
device_address = socket.gethostbyname(socket.gethostname() + ".local")
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.settimeout(0)
try:
s.connect(('8.8.8.8', 1))
device_address = s.getsockname()[0]
except Exception:
device_address = '127.0.0.1'
finally:
s.close()
print(f"Device address for proxy agent for testing: {device_address}")
bacnet_proxy_agent_config = {
"device_address": device_address,
Expand Down

0 comments on commit 50290af

Please sign in to comment.