@MaximusHaximus pointed out that auto create account, transfer remaining balance to new account is the current behavior whenever the test account doesn't sufficient balance. However, if we want to test the transaction should fail when insufficient balance, current approach blocks us. It's wise to leave this manual and transparent to the user.
I took a deep look recently. It only applied to Testnet AccountManager. I guess the reason is to workaround CI, but it's a wrong place of this mechanism: if needed, txn should be explicitly retried in test code, not library code, with recreated account.
@MaximusHaximus pointed out that auto create account, transfer remaining balance to new account is the current behavior whenever the test account doesn't sufficient balance. However, if we want to test the transaction should fail when insufficient balance, current approach blocks us. It's wise to leave this manual and transparent to the user.
I took a deep look recently. It only applied to Testnet AccountManager. I guess the reason is to workaround CI, but it's a wrong place of this mechanism: if needed, txn should be explicitly retried in test code, not library code, with recreated account.