Browse Source

Disable broken test

The test may be broken by design. In such case, it should be removed.
But it is left there for now, maybe it's just broken implementation and
someone (the reviewer?) may have an idea how to fix it.
Michal 'vorner' Vaner 12 years ago
parent
commit
c0128e8064
1 changed files with 7 additions and 3 deletions
  1. 7 3
      src/lib/util/threads/tests/lock_unittest.cc

+ 7 - 3
src/lib/util/threads/tests/lock_unittest.cc

@@ -46,13 +46,17 @@ TEST(MutexTest, lockMultiple) {
 }
 
 // Destroying a locked mutex is a bad idea as well
-TEST(MutexTest, destroyLocked) {
+//
+// FIXME: The test is disabled, since it screws something up in the VM (other
+// tests fail then with rather cryptic messages, memory dumps and stuff).
+// Any idea how to make the test work and reasonably safe?
+TEST(MutexTest, DISABLED_destroyLocked) {
     // TODO: This probably won't work for non-debug mutexes. Disable on non-debug
     // compilation.
     Mutex* mutex = new Mutex;
-    Mutex::Locker* locker = new Mutex::Locker(*mutex);
+    new Mutex::Locker(*mutex);
     EXPECT_THROW(delete mutex, isc::InvalidOperation);
-    // Note: This maybe leaks the locker. But this is a test for development aid
+    // Note: This leaks the locker. But this is a test for development aid
     // exception. The exception won't happen in normal build anyway and seeing
     // it means there's a bug. And we can't delete the locker now, since it
     // would access uninitialized memory.