Skip to content

Commit 96b2711

Browse files
Make each product use their own gRPC Device Server ports in the System Tests (#2086)
* Make each product use their own gRPC Device Server ports * Change comma to period --------- Co-authored-by: Saarthak Mohan <--global>
1 parent 6a67d01 commit 96b2711

File tree

13 files changed

+74
-8
lines changed

13 files changed

+74
-8
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"address": "[::1]",
3+
"port": 31760,
4+
"security" : {
5+
"server_cert": "",
6+
"server_key": "",
7+
"root_cert": ""
8+
}
9+
}

src/nidcpower/system_tests/test_system_nidcpower.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,9 @@ def test_lcr_compensation_data(self, session):
10991099
class TestGrpc(SystemTests):
11001100
@pytest.fixture(scope='class')
11011101
def grpc_channel(self):
1102-
with system_test_utilities.GrpcServerProcess() as proc:
1102+
current_directory = os.path.dirname(os.path.abspath(__file__))
1103+
config_file_path = os.path.join(current_directory, 'grpc_server_config.json')
1104+
with system_test_utilities.GrpcServerProcess(config_file_path) as proc:
11031105
channel = grpc.insecure_channel(f"localhost:{proc.server_port}")
11041106
yield channel
11051107

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"address": "[::1]",
3+
"port": 31761,
4+
"security" : {
5+
"server_cert": "",
6+
"server_key": "",
7+
"root_cert": ""
8+
}
9+
}

src/nidigital/system_tests/test_system_nidigital.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,9 @@ def test_enable_match_fail_combination(self, multi_instrument_session):
13501350
class TestGrpc(SystemTests):
13511351
@pytest.fixture(scope='class')
13521352
def grpc_channel(self):
1353-
with system_test_utilities.GrpcServerProcess() as proc:
1353+
current_directory = os.path.dirname(os.path.abspath(__file__))
1354+
config_file_path = os.path.join(current_directory, 'grpc_server_config.json')
1355+
with system_test_utilities.GrpcServerProcess(config_file_path) as proc:
13541356
channel = grpc.insecure_channel(f"localhost:{proc.server_port}")
13551357
yield channel
13561358

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"address": "[::1]",
3+
"port": 31762,
4+
"security" : {
5+
"server_cert": "",
6+
"server_key": "",
7+
"root_cert": ""
8+
}
9+
}

src/nidmm/system_tests/test_system_nidmm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,9 @@ def test_fetch_waveform_into(self, session):
330330
class TestGrpc(SystemTests):
331331
@pytest.fixture(scope='class')
332332
def grpc_channel(self):
333-
with system_test_utilities.GrpcServerProcess() as proc:
333+
current_directory = os.path.dirname(os.path.abspath(__file__))
334+
config_file_path = os.path.join(current_directory, 'grpc_server_config.json')
335+
with system_test_utilities.GrpcServerProcess(config_file_path) as proc:
334336
channel = grpc.insecure_channel(f"localhost:{proc.server_port}")
335337
yield channel
336338

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"address": "[::1]",
3+
"port": 31763,
4+
"security" : {
5+
"server_cert": "",
6+
"server_key": "",
7+
"root_cert": ""
8+
}
9+
}

src/nifgen/system_tests/test_system_nifgen.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,9 @@ def test_write_named_waveform_numpy_array_int16(self, session):
516516
class TestGrpc(SystemTests):
517517
@pytest.fixture(scope='class')
518518
def grpc_channel(self):
519-
with system_test_utilities.GrpcServerProcess() as proc:
519+
current_directory = os.path.dirname(os.path.abspath(__file__))
520+
config_file_path = os.path.join(current_directory, 'grpc_server_config.json')
521+
with system_test_utilities.GrpcServerProcess(config_file_path) as proc:
520522
channel = grpc.insecure_channel(f"localhost:{proc.server_port}")
521523
yield channel
522524

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"address": "[::1]",
3+
"port": 31764,
4+
"security" : {
5+
"server_cert": "",
6+
"server_key": "",
7+
"root_cert": ""
8+
}
9+
}

src/niscope/system_tests/test_system_niscope.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,9 @@ def test_reset_with_defaults(self, single_instrument_session):
612612
class TestGrpc(SystemTests):
613613
@pytest.fixture(scope='class')
614614
def grpc_channel(self):
615-
with system_test_utilities.GrpcServerProcess() as proc:
615+
current_directory = os.path.dirname(os.path.abspath(__file__))
616+
config_file_path = os.path.join(current_directory, 'grpc_server_config.json')
617+
with system_test_utilities.GrpcServerProcess(config_file_path) as proc:
616618
channel = grpc.insecure_channel(f"localhost:{proc.server_port}")
617619
yield channel
618620

0 commit comments

Comments
 (0)