testbase: Fix ref writing

Transactions require a cancellable.