示例#1
0
 /**
  * @iterations 500
  */
 public function updating10times()
 {
     $idx = rand(0, count($this->_ids) - 1);
     $_id = $this->_ids[$idx];
     $model = TestSchema::findOne($_id);
     Buffer::open();
     for ($i = 0; $i < 10; $i++) {
         $model->title = 'updating ' . $i;
         if (!$model->save()) {
             throw new Exception(__METHOD__);
         }
     }
     Buffer::flush();
     Buffer::close();
 }