Skip to content

Commit

Permalink
Add test for #2849
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov committed Jan 13, 2023
1 parent bcc8003 commit 85ff87c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions cmd/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,30 @@ func TestAbortedByScriptAbortInVUCode(t *testing.T) {
})
}

func TestAbortedByScriptAbortInVUCodeInGroup(t *testing.T) {
t.Parallel()
script := `
import exec from 'k6/execution';
import { group } from 'k6';
export default function () {
group("here", () => {
exec.test.abort('foo');
});
};
export function handleSummary() { return {stdout: '\n\n\nbogus summary\n\n\n'};}
`

t.Run("noLinger", func(t *testing.T) {
t.Parallel()
testAbortedByScriptTestAbort(t, true, script, runTestWithNoLinger)
})

t.Run("withLinger", func(t *testing.T) {
t.Parallel()
testAbortedByScriptTestAbort(t, true, script, runTestWithLinger)
})
}

func TestAbortedByScriptAbortInSetup(t *testing.T) {
t.Parallel()
script := `
Expand Down

0 comments on commit 85ff87c

Please sign in to comment.