Exemple #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},
	)
}
Exemple #2
0
// We only have one state: running.
func running(next byte) smat.ActionID {
	return smat.PercentExecute(next, runningPercentActions...)
}
Exemple #3
0
func dbOpen(next byte) smat.ActionID {
	return smat.PercentExecute(next,
		smat.PercentAction{10, closeReopen},
		smat.PercentAction{90, startWriteTx},
	)
}