Skip to content

Commit

Permalink
Update error message and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Mirić committed Aug 6, 2021
1 parent 277d244 commit 314e25c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func (e *ExecutionScheduler) Run(globalCtx, runCtx context.Context, engineOut ch
// We are using this context to allow lib.Executor implementations to cancel
// this context effectively stopping all executions.
//
// This is for addressing abortTest()
// This is for addressing test.abort().
execCtx := executor.Context(runSubCtx)
for _, exec := range e.executors {
go e.runExecutor(execCtx, runResults, engineOut, exec)
Expand Down
4 changes: 2 additions & 2 deletions js/common/interrupt_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func (i *InterruptError) Error() string {
return i.Reason
}

// AbortTest is a reason emitted when a test script calls abortTest() without arguments
const AbortTest = "abortTest() was called in a script"
// AbortTest is the reason emitted when a test script calls test.abort()
const AbortTest = "test aborted"

// IsInterruptError returns true if err is *InterruptError.
func IsInterruptError(err error) bool {
Expand Down
2 changes: 1 addition & 1 deletion lib/executor/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ type cancelExec struct {
// executors.
//
// This allows executors to globally halt any executions that uses this context.
// Example use case is when a script calls abortTest()
// Example use case is when a script calls test.abort().
func Context(ctx context.Context) context.Context {
ctx, cancel := context.WithCancel(ctx)
return context.WithValue(ctx, cancelKey{}, &cancelExec{cancel: cancel})
Expand Down

0 comments on commit 314e25c

Please sign in to comment.