|
|
@@ -96,12 +96,12 @@ func applyDoors(t *testing.T, obs, ctl, cmd string, door float64) *hthv1.ActionR
|
|
|
t.Fatal(err)
|
|
|
}
|
|
|
defer cc.Close()
|
|
|
- ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
|
|
|
+ ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
|
|
defer cancel()
|
|
|
obsCli := hthv1.NewObserveServiceClient(oc)
|
|
|
ctrl := hthv1.NewControlServiceClient(cc)
|
|
|
lease, err := ctrl.AcquireControlLease(ctx, &hthv1.AcquireControlLeaseRequest{
|
|
|
- DeviceId: "prod2u-0", Holder: "pty-fault", Ttl: durationpb.New(2 * time.Second),
|
|
|
+ DeviceId: "prod2u-0", Holder: "pty-fault", Ttl: durationpb.New(20 * time.Second),
|
|
|
})
|
|
|
if err != nil {
|
|
|
t.Fatal(err)
|
|
|
@@ -113,7 +113,7 @@ func applyDoors(t *testing.T, obs, ctl, cmd string, door float64) *hthv1.ActionR
|
|
|
res, err := ctrl.ApplyAction(ctx, &hthv1.ApplyActionRequest{Batch: &hthv1.ActionBatch{
|
|
|
DeviceId: "prod2u-0", CommandId: cmd, LeaseId: lease.Lease.LeaseId, LeaseEpoch: lease.Lease.LeaseEpoch,
|
|
|
BasedOnSnapshotSeq: snap.Snapshot.SnapshotSeq, ExpectedControlRevision: snap.Snapshot.ControlRevision, AllowClamp: true,
|
|
|
- ValidUntil: timestamppb.New(time.Now().Add(2 * time.Second)),
|
|
|
+ ValidUntil: timestamppb.New(time.Now().Add(20 * time.Second)),
|
|
|
ContinuousTargets: []*hthv1.ContinuousTarget{
|
|
|
{Id: ids.DoorX, Value: door}, {Id: ids.DoorY, Value: door}, {Id: ids.DoorZ, Value: door},
|
|
|
},
|
|
|
@@ -223,7 +223,7 @@ func TestPTYDisconnectInvalidatesOldLease(t *testing.T) {
|
|
|
defer acancel()
|
|
|
res, err := ctrl.ApplyAction(actx, &hthv1.ApplyActionRequest{Batch: &hthv1.ActionBatch{
|
|
|
DeviceId: "prod2u-0", CommandId: "after-disc", LeaseId: lease.Lease.LeaseId, LeaseEpoch: lease.Lease.LeaseEpoch,
|
|
|
- ValidUntil: timestamppb.New(time.Now().Add(2 * time.Second)),
|
|
|
+ ValidUntil: timestamppb.New(time.Now().Add(20 * time.Second)),
|
|
|
ContinuousTargets: []*hthv1.ContinuousTarget{{Id: ids.Fan1, Value: 10}},
|
|
|
}})
|
|
|
if err != nil {
|