Skip to content

Commit

Permalink
Merge pull request #3163 from davidraker/new_minor_driver_test_updates
Browse files Browse the repository at this point in the history
New minor driver test updates
  • Loading branch information
craig8 authored Mar 29, 2024
2 parents 1924bdd + 74503d9 commit 9e5ff55
Show file tree
Hide file tree
Showing 3 changed files with 13 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import gevent
import pytest

from pathlib import Path

from volttron.platform.agent.known_identities import CONFIGURATION_STORE, PLATFORM_DRIVER
from volttron.platform import jsonapi
from volttrontesting.utils.platformwrapper import PlatformWrapper
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 9e5ff55

Please sign in to comment.