Fixes misc test cases
[libcds.git] / test / stress / misc / rwlock_driver.cpp
index 7d0084d..2c61d44 100644 (file)
@@ -46,11 +46,11 @@ protected:
           if (!rwlock->write_trylock()) {
             rwlock->write_lock();
           }
-          x += 1;
+          x++;
           rwlock->write_unlock();
         } else {
           rwlock->write_lock();
-          x += 1;
+          x++;
           rwlock->write_unlock();
         }
       }
@@ -65,7 +65,7 @@ RWLock *RWLockTest::rwlock;
 TEST_F(RWLockTest, BasicLockUnlock) {
   rwlock = new RWLock();
   int num_threads = s_nRWLockThreadCount;
-  for (int write_percentage = 5; write_percentage < 50; write_percentage += 5) {
+  for (int write_percentage = 5; write_percentage < 40; write_percentage += 5) {
     std::thread *threads = new std::thread[num_threads];
     for (size_t i = 0; i < num_threads; i++) {
       threads[i] = std::thread(ReaderWriterThread, write_percentage);