Skip to content

Commit b2a262d

Browse files
authoredJul 13, 2023
RSDK-4015: flaky test in components/gantry/singleaxis, times out after 10 minutes (viamrobotics#2641)
1 parent 71ec6ac commit b2a262d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎components/gantry/singleaxis/singleaxis.go

+6
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,13 @@ func (g *singleAxis) moveAway(ctx context.Context, pin int) error {
294294
if err := g.motor.GoFor(ctx, dir*g.rpm, 0, nil); err != nil {
295295
return err
296296
}
297+
defer utils.UncheckedErrorFunc(func() error {
298+
return g.motor.Stop(ctx, nil)
299+
})
297300
for {
301+
if ctx.Err() != nil {
302+
return ctx.Err()
303+
}
298304
hit, err := g.limitHit(ctx, pin)
299305
if err != nil {
300306
return err

0 commit comments

Comments
 (0)
Please sign in to comment.