Skip to content

Commit

Permalink
feat(lib): add crashes to InjectFaults
Browse files Browse the repository at this point in the history
  • Loading branch information
symbiont-stevan-andjelkovic committed Jan 11, 2021
1 parent 561ab93 commit a5fab2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,15 @@ func InjectFaults(faults Faults) {
var schedulerFault SchedulerFault
switch ev := fault.Args.(type) {
case Omission:
//assert fault.Kind?
schedulerFault.Kind = fault.Kind
schedulerFault.From = ev.From
schedulerFault.To = ev.To
schedulerFault.At = ev.At // convert?
case Crash:
schedulerFault.Kind = fault.Kind
schedulerFault.From = ev.From
schedulerFault.To = "" // Not used.
schedulerFault.At = ev.At // convert?
default:
panic(fmt.Sprintf("Unknown fault type: %#v\n", fault))
}
Expand Down

0 comments on commit a5fab2c

Please sign in to comment.