Skip to content

Commit 8ad5f06

Browse files
committed
dploy
1 parent b12e05d commit 8ad5f06

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

FprimeZephyrReference/test/int/antenna_deployer_test.py

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def test_multiple_deploy_attempts(fprime_test_api: IntegrationTestAPI, start_gds
145145

146146
# Wait for retry delay and verify second attempt
147147
attempt_event = fprime_test_api.assert_event(
148-
f"{antenna_deployer}.DeployAttempt", timeout=10
148+
f"{antenna_deployer}.DeployAttempt", timeout=15
149149
)
150150
assert attempt_event.args[0].val == 2, "Second attempt should be #2"
151151

@@ -155,7 +155,7 @@ def test_multiple_deploy_attempts(fprime_test_api: IntegrationTestAPI, start_gds
155155

156156
# Wait for retry delay and verify third attempt
157157
attempt_event = fprime_test_api.assert_event(
158-
f"{antenna_deployer}.DeployAttempt", timeout=10
158+
f"{antenna_deployer}.DeployAttempt", timeout=15
159159
)
160160
assert attempt_event.args[0].val == 3, "Third attempt should be #3"
161161

@@ -165,7 +165,7 @@ def test_multiple_deploy_attempts(fprime_test_api: IntegrationTestAPI, start_gds
165165

166166
# Verify final failure after exhausting all attempts
167167
finish_event: EventData = fprime_test_api.assert_event(
168-
f"{antenna_deployer}.DeployFinish", timeout=10
168+
f"{antenna_deployer}.DeployFinish", timeout=15
169169
)
170170
assert finish_event.args[0].val == "DEPLOY_RESULT_FAILED"
171171
assert finish_event.args[1].val == 3, "Should have completed 3 attempts"
@@ -190,28 +190,18 @@ def test_burn_duration_sec(fprime_test_api: IntegrationTestAPI, start_gds):
190190
"First deployment attempt should be attempt #1"
191191
)
192192

193-
# Record the time when burnwire starts
194-
burn_start_event = fprime_test_api.assert_event(
195-
f"{burnwire}.SetBurnwireState", "ON", timeout=2
196-
)
197-
start_time = burn_start_event.time
198-
199-
# Wait for burnwire to stop and record the time
200-
burn_stop_event = fprime_test_api.assert_event(
201-
f"{burnwire}.SetBurnwireState", "OFF", timeout=15
202-
)
203-
stop_time = burn_stop_event.time
193+
# Verify burnwire starts
194+
fprime_test_api.assert_event(f"{burnwire}.SetBurnwireState", "ON", timeout=2)
204195

205-
# Calculate actual burn duration (convert from microseconds to seconds)
206-
# TimeType objects need to be converted to numeric values first
207-
time_diff = stop_time - start_time
208-
actual_duration_seconds = (
209-
float(time_diff) / 1000000.0
210-
) # Convert microseconds to seconds
196+
# Wait for burnwire to stop
197+
fprime_test_api.assert_event(f"{burnwire}.SetBurnwireState", "OFF", timeout=15)
211198

212-
# Verify the burn duration is approximately 3 seconds (allow some tolerance for timing)
213-
assert 2.5 <= actual_duration_seconds <= 3.5, (
214-
f"Burn duration should be ~3 seconds, got {actual_duration_seconds:.2f}s"
199+
# Verify the burnwire end count shows 3 seconds
200+
burnwire_end_event: EventData = fprime_test_api.assert_event(
201+
f"{burnwire}.BurnwireEndCount", timeout=5
202+
)
203+
assert burnwire_end_event.args[0].val == 3, (
204+
"Burnwire should have burned for 3 seconds"
215205
)
216206

217207
# Verify deployment finishes with failure (no distance sensor)

0 commit comments

Comments
 (0)