1
0
Fork 0

Don't test WAL removal

Look, it could always happen if the node is crashed hard. A WAL file
could be left around at anytime, just accept it and don't bother with
the cleanup.
master
Philip O'Toole 9 months ago
parent fc7b9901f6
commit 54a2487807

@ -573,6 +573,7 @@ func (s *Store) Ready() bool {
func (s *Store) Close(wait bool) (retErr error) {
defer func() {
if retErr == nil {
s.logger.Printf("store closed with node ID %s, listening on %s", s.raftID, s.ln.Addr().String())
s.open = false
}
}()
@ -580,7 +581,6 @@ func (s *Store) Close(wait bool) (retErr error) {
// Protect against closing already-closed resource, such as channels.
return nil
}
s.logger.Printf("closing store with node ID %s, listening on %s", s.raftID, s.ln.Addr().String())
s.dechunkManager.Close()

@ -25,18 +25,6 @@ class TestSingleNode(unittest.TestCase):
def tearDown(self):
self.cluster.deprovision()
def test_no_wal_on_shutdown(self):
'''Test that a node does not have a WAL file after graceful shutdown'''
n = self.cluster.wait_for_leader()
n.execute('CREATE TABLE foo (id INTEGER NOT NULL PRIMARY KEY, name TEXT)')
db_path = n.db_path()
wal_path = n.wal_path()
self.assertTrue(os.path.exists(db_path))
self.assertTrue(os.path.exists(wal_path))
n.stop(graceful=True)
self.assertTrue(os.path.exists(db_path))
self.assertFalse(os.path.exists(wal_path))
def test_simple_raw_queries(self):
'''Test simple queries work as expected'''
n = self.cluster.wait_for_leader()

Loading…
Cancel
Save