Beispiel #1
0
func writeTxOpen(next byte) smat.ActionID {
	return smat.PercentExecute(next,
		smat.PercentAction{30, setRandom},
		smat.PercentAction{30, deleteRandom},
		smat.PercentAction{30, commitTx},
		smat.PercentAction{10, rollbackTx},
	)
}
Beispiel #2
0
// We only have one state: running.
func running(next byte) smat.ActionID {
	return smat.PercentExecute(next, runningPercentActions...)
}
Beispiel #3
0
func dbOpen(next byte) smat.ActionID {
	return smat.PercentExecute(next,
		smat.PercentAction{10, closeReopen},
		smat.PercentAction{90, startWriteTx},
	)
}