aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/libutil/pool.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-04-05 23:17:18 +0000
committerGerrit Code Review <gerrit@lix>2024-04-05 23:17:18 +0000
commite9e1b6963c8ee2a0a382487e1346677e77bc1e9e (patch)
tree4d63978643543657db594327a8f70e1b5c3931d2 /tests/unit/libutil/pool.cc
parent405e41e288768ed99002f7b1d7d68f41c6152c12 (diff)
parent38dc6f5b69da81dfd21780ef16efaa297f9c2231 (diff)
Merge changes I1fa30114,I3ca208b6,Ide4c6e00,I74c46b9f,I05fa6a9d, ... into main
* changes: Revert "libutil: drop Pool resources on exceptional free" Revert "libutil: remove Pool::Handle::bad" Revert "libstore: remove one Resource::good flag" Revert "libstore: using throwing finally in withFramedSink" Revert "libutil: allow graceful dropping of Pool::Handle" Revert "libutil: drop Fs{Source,Sink}::good" libutil: guard Finally against invalid exception throws
Diffstat (limited to 'tests/unit/libutil/pool.cc')
-rw-r--r--tests/unit/libutil/pool.cc15
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/unit/libutil/pool.cc b/tests/unit/libutil/pool.cc
index 3ad4ed3aa..90ee509ba 100644
--- a/tests/unit/libutil/pool.cc
+++ b/tests/unit/libutil/pool.cc
@@ -109,19 +109,4 @@ namespace nix {
ASSERT_NE(h->num, counter);
}
}
-
- TEST(Pool, throwingOperationDropsResource)
- {
- auto createResource = []() { return make_ref<TestResource>(); };
-
- Pool<TestResource> pool = Pool<TestResource>((size_t)1, createResource);
-
- ASSERT_THROW({
- auto _r = pool.get();
- ASSERT_EQ(pool.count(), 1);
- throw 1;
- }, int);
-
- ASSERT_EQ(pool.count(), 0);
- }
}