Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Delete always content from table master_slave_table between tests. #203

Merged
merged 1 commit into from

3 participants

@kimhemsoe
Collaborator

Fixes that we are currently failing master slave tests.

@stof stof commented on the diff
...e/Tests/DBAL/Functional/MasterSlaveConnectionTest.php
((6 lines not shown))
} catch(\Exception $e) {
}
+
+ $this->_conn->executeUpdate('DELETE FROM master_slave_table');
+ $this->_conn->insert('master_slave_table', array('test_int' => 1));
@stof
stof added a note

you should keep it in the try/catch block

@kimhemsoe Collaborator

How will we then ever execute the line there delete rows from previous tests ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@beberlei beberlei merged commit 43bfbf9 into from
@beberlei beberlei referenced this pull request from a commit
@beberlei beberlei Merge branch 'GH-203' into 2.3 e00ce93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
5 tests/Doctrine/Tests/DBAL/Functional/MasterSlaveConnectionTest.php
@@ -27,9 +27,12 @@ public function setUp()
$sm = $this->_conn->getSchemaManager();
$sm->createTable($table);
- $this->_conn->insert('master_slave_table', array('test_int' => 1));
+
} catch(\Exception $e) {
}
+
+ $this->_conn->executeUpdate('DELETE FROM master_slave_table');
+ $this->_conn->insert('master_slave_table', array('test_int' => 1));
@stof
stof added a note

you should keep it in the try/catch block

@kimhemsoe Collaborator

How will we then ever execute the line there delete rows from previous tests ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
}
public function createMasterSlaveConnection($keepSlave = false)
Something went wrong with that request. Please try again.