Skip to content

Commit 3779a5b

Browse files
committed
attempt to fix failing tests on windows
1 parent 969ba7d commit 3779a5b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/sqlite.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,15 @@ impl SqliteSessionStore {
186186
/// # fn main() -> Result { async_std::task::block_on(async {
187187
/// let store = SqliteSessionStore::new("sqlite:%3Amemory:").await?;
188188
/// store.migrate().await?;
189+
/// # let join_handle =
189190
/// store.spawn_cleanup_task(Duration::from_secs(1));
190191
/// let mut session = Session::new();
191192
/// session.expire_in(Duration::from_secs(0));
192193
/// store.store_session(session).await;
193194
/// assert_eq!(store.count().await?, 1);
194195
/// async_std::task::sleep(Duration::from_secs(2)).await;
195196
/// assert_eq!(store.count().await?, 0);
197+
/// # join_handle.cancel().await;
196198
/// # Ok(()) }) }
197199
/// ```
198200
pub fn spawn_cleanup_task(&self, period: Duration) -> task::JoinHandle<()> {

0 commit comments

Comments
 (0)