module-transaction: Do not allow parallel conversations by default
Pam conversations per se may also run in parallel, but this implies that the application supports this. Since this normally not the case, do not create modules that may invoke the pam conversations in parallel by default, adding a mutex to protect such calls.
This commit is contained in:
@@ -305,11 +305,10 @@ func Test_ModuleTransaction_InvokeHandler(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func Test_MockModuleTransaction(t *testing.T) {
|
||||
func testMockModuleTransaction(t *testing.T, mt *moduleTransaction) {
|
||||
t.Helper()
|
||||
t.Parallel()
|
||||
|
||||
mt, _ := NewModuleTransactionInvoker(nil).(*moduleTransaction)
|
||||
|
||||
tests := map[string]struct {
|
||||
testFunc func(mock *mockModuleTransaction) (any, error)
|
||||
mockExpectations mockModuleTransactionExpectations
|
||||
@@ -914,3 +913,13 @@ func Test_MockModuleTransaction(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_MockModuleTransaction(t *testing.T) {
|
||||
mt, _ := NewModuleTransactionInvoker(nil).(*moduleTransaction)
|
||||
testMockModuleTransaction(t, mt)
|
||||
}
|
||||
|
||||
func Test_MockModuleTransactionParallelConv(t *testing.T) {
|
||||
mt, _ := NewModuleTransactionInvokerParallelConv(nil).(*moduleTransaction)
|
||||
testMockModuleTransaction(t, mt)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user