1
0
Fork 0

Fix up tests

master
Philip O'Toole 8 months ago
parent f5c136e206
commit 7472f6a949

@ -126,8 +126,8 @@ func Test_UploaderSingleUpload_Checksum(t *testing.T) {
wg.Wait()
cancel()
<-done
if exp, got := int64(1), stats.Get(numUploadsSkipped).(*expvar.Int); exp != got.Value() {
t.Errorf("expected numUploadsSkipped to be %d, got %d", exp, got)
if exp, got := int64(1), stats.Get(numUploadsSkippedSum).(*expvar.Int); exp != got.Value() {
t.Errorf("expected numUploadsSkippedSum to be %d, got %d", exp, got)
}
}

@ -386,6 +386,8 @@ class TestAutoBackupS3(unittest.TestCase):
node.execute('CREATE TABLE foo (id INTEGER NOT NULL PRIMARY KEY, name TEXT)')
node.execute('INSERT INTO foo(name) VALUES("fiona")')
node.wait_for_all_fsm()
j = node.query('SELECT count(*) FROM foo', level='strong')
self.assertEqual(j, d_("{'results': [{'values': [[1]], 'types': ['integer'], 'columns': ['count(*)']}]}"))
node.wait_for_upload(i+1)
# Download the backup file from S3 and check it.
@ -443,6 +445,8 @@ class TestAutoBackupS3(unittest.TestCase):
for _ in range(100):
node.execute('INSERT INTO foo(name) VALUES("fiona")')
node.wait_for_all_fsm()
j = node.query('SELECT count(*) FROM foo', level='strong')
self.assertEqual(j, d_("{'results': [{'values': [[100]], 'types': ['integer'], 'columns': ['count(*)']}]}"))
node.wait_for_upload(i+1, timeout=10)
# Download the backup file from S3 and check it.

Loading…
Cancel
Save