OK - I’ve cloned the repo and written a test and, by stepping through the code, can see that even though I am calling SetCommandTimeout(180)
the actual command timeout is being taken from OrmLiteConfig.CommandTimeout
i.e. 30 seconds.
Can I ask in what cases does SetCommandTimeout
have an effect?
[Test]
public async Task Can_Set_CommandTimeout()
{
using (var db = OpenDbConnection())
{
db.DropAndCreateTable<Poco>();
db.SetCommandTimeout(180);
await db.SelectAsync<Poco>().ConfigureAwait(false);
Assert.AreEqual(((OrmLiteConnection)db).CommandTimeout, 180);
}
}