Index: state/state.go |
=== modified file 'state/state.go' |
--- state/state.go 2013-11-28 09:07:52 +0000 |
+++ state/state.go 2013-12-03 18:10:09 +0000 |
@@ -87,9 +87,14 @@ |
transactionHooks := <-st.transactionHooks |
st.transactionHooks <- nil |
if len(transactionHooks) > 0 { |
+ // Note that this code should only ever be triggered |
+ // during tests. If we see the log messages below |
+ // in a production run, something is wrong. |
defer func() { |
if transactionHooks[0].After != nil { |
+ logger.Infof("transaction 'after' hook start") |
transactionHooks[0].After() |
+ logger.Infof("transaction 'after' hook end") |
} |
if <-st.transactionHooks != nil { |
panic("concurrent use of transaction hooks") |
@@ -97,7 +102,9 @@ |
st.transactionHooks <- transactionHooks[1:] |
}() |
if transactionHooks[0].Before != nil { |
+ logger.Infof("transaction 'before' hook start") |
transactionHooks[0].Before() |
+ logger.Infof("transaction 'before' hook end") |
} |
} |
return st.runner.Run(ops, "", nil) |