blob: f5c2e1c0efc7207117ca17d5c0be81e80d1516ba [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package test_service
// CancelCollector is a test interface for use in testing cancellation and deadlines.
type CancelCollector interface {
// A function that never returns, but records the status of the given key.
NeverReturn(key int64) error
// Wait for the call with the given key to have the given status. Possible statuses are:
// "running", and, "cancelled". Returns the number of nanoseconds left on
// the deadline of the specified call when the call first began.
WaitForStatus(key int64, status string) (timeout int64 | error)
}