independent plugs in same test
- Dominant language
- Python
- Stars
- 722
- Forks
- 237
- Avg merge
- 11h 31m
- Merged PRs (30d)
- 4
Description
Hi, I have two plugs (ea_psu_plug, motion_master_plug). below test gets stuck.
ideally, 1st phase should turn ON the power supply and rest phase runs actual tests with motor.
- **scenario 1 :** phase **test_start_psu** runs without any error and turns ON the power supply.
_(note: phase test_position_control is commented out in this scenario)_
- **scenario 2 :** But when i include phase **test_position_control** along with above phase then test gets stuck with log _Executing phase trigger_phase_ . All phases remains in **waiting**
```python
@htf.measures(htf.Measurement("psu_voltage").in_range(46, 48))
@htf.plug(epp=ea_psu_plug.EaPsuPlug)
def test_start_psu(test, output_num, voltage, epp):
psu_found = epp.get_device_description(output_num)
test.logger.info('power supply is %s', psu_found)
epp.set_voltage(voltage, output_num)
epp.output_on(output_num)
test.logger.info("power supply is turned ON")
measured_voltage = epp.get_voltage(output_num)
test.logger.info("psu voltage is set to %d V" % measured_voltage)
test.measurements.psu_voltage = measured_voltage
@htf.measures(htf.Measurement("position_difference").in_range(900, 1100))
@htf.plug(mmp=motion_master_plug.MotionMasterPlug)
def test_position_control(test, node_id, mmp):
actual_position = mmp.get_position(node_id)
mmp.set_position(node_id, actual_position + 1000)
time.sleep(1)
test.measurements.position_difference = abs(mmp.get_position(node_id) -
actual_position)
if __name__ == '__main__':
test_name = "test_motor_control"
dut = "single_node_chain"
test = htf.Test(
test_start_psu.with_args(output_num=0, voltage=48),
test_position_control.with_args(node_id=0),
test_name=test_name)
test.execute(test_start=lambda: dut)
```
Contributor guide
Assessment
This issue has not been assessed yet.