Skip to content

Commit

Permalink
rafttest: add _breakpoint directive
Browse files Browse the repository at this point in the history
It is a helper case to attach a debugger to when a problem needs
to be investigated in a longer test file. In such a case, add the
following stanza immediately before the interesting behavior starts:

_breakpoint:
----
ok

and set a breakpoint on the _breakpoint case.
  • Loading branch information
tbg committed Aug 14, 2019
1 parent fdaed88 commit 3d6721f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions raft/rafttest/interaction_env_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ func (env *InteractionEnv) Handle(t *testing.T, d datadriven.TestData) string {
env.Output.Reset()
var err error
switch d.Cmd {
case "_breakpoint":
// This is a helper case to attach a debugger to when a problem needs
// to be investigated in a longer test file. In such a case, add the
// following stanza immediately before the interesting behavior starts:
//
// _breakpoint:
// ----
// ok
//
// and set a breakpoint on the `case` above.
case "add-nodes":
// Example:
//
Expand Down

0 comments on commit 3d6721f

Please sign in to comment.