summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2019-08-01 17:10:34 +0200
committerSam Thursfield <sam@afuera.me.uk>2019-08-01 17:14:56 +0200
commit6c537a10b29a042f7e04e6c71a0f96756673e880 (patch)
treed134e5dc4f67bffd7baf9cb02b37d99b4d9c13be
parent18c06d6ba1e87cfe4a8e8222cda8a5476fd930e1 (diff)
downloadtracker-6c537a10b29a042f7e04e6c71a0f96756673e880.tar.gz
functional-tests: Remove 12-transactions test
This test repeatedly inserts lots of data into Tracker and then kills the store. Recently its been timing out in CI even when given a 120 sec timeout, which suggests that it performs very badly on some kinds of virtualized hardware. It seems unlikely that this test will find useful regressions. At best it could find some underlying issue in SQLite, at random, but we don't really need to run this kind of resource intensive stress test on every commit.
-rwxr-xr-xtests/functional-tests/12-transactions.py87
-rw-r--r--tests/functional-tests/meson.build1
2 files changed, 0 insertions, 88 deletions
diff --git a/tests/functional-tests/12-transactions.py b/tests/functional-tests/12-transactions.py
deleted file mode 100755
index 5f6d870d3..000000000
--- a/tests/functional-tests/12-transactions.py
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/python3
-#
-# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-"""
-Make sure that when COMMIT returns, the data is in the DB
-"""
-import time
-
-import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
-
-TEST_INSTANCE_PATTERN = "test://12-transactions-%d"
-
-
-class TrackerTransactionsTest (CommonTrackerStoreTest):
- """
- In a loop:
- 1. Inserts a Batch of instances
- 2. Wait for batch commit
- 3. Abort (SIGKILL) the daemon
- 4. Restart daemon a query # of instances
-
- If the commit was real, all the inserted instances should be there.
- """
-
- def setUp(self):
- self.instance_counter = 0
-
- def tearDown(self):
- print("Tear down (will take some time to remove all resources)")
- delete_sparql = "DELETE { ?u a rdfs:Resource } WHERE { ?u a nmo:Email} \n"
- self.tracker.update(delete_sparql,
- timeout=60000)
- self.instance_counter = 0
-
- def insert_and_commit(self, number):
- insert_sparql = "INSERT {\n"
- for i in range(0, number):
- insert_sparql += " <" + \
- TEST_INSTANCE_PATTERN % (self.instance_counter) + ">"
- insert_sparql += " a nmo:Email.\n "
- self.instance_counter += 1
-
- insert_sparql += "}"
- self.tracker.batch_update(insert_sparql)
- # print "Waiting for commit (", number," instances)"
- #start = time.time ()
- self.tracker.batch_commit()
- #end = time.time ()
- # print "BatchCommit returned (after %d s.)" % (end - start)
-
- def test_commit_and_abort(self):
-
- for i in range(0, 20):
- NUMBER_OF_INSTANCES = 1000
- self.insert_and_commit(NUMBER_OF_INSTANCES)
-
- self.tracker.kill()
- self.tracker.start()
- try:
- results = self.tracker.count_instances("nmo:Email")
- except:
- print("Timeout, probably replaying journal or something (wait 20 sec.)")
- time.sleep(20)
- results = self.tracker.count_instances()
-
- # Every iteration we are adding new instances in the store!
- self.assertEqual(results, NUMBER_OF_INSTANCES * (i + 1))
-
-if __name__ == "__main__":
- ut.main()
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index 274c88abf..d74c0806f 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -20,7 +20,6 @@ functional_tests = [
'07-graph',
'08-unique-insertions',
'09-concurrent-query',
- '12-transactions',
'14-signals',
'15-statistics',
'16-collation',