diff options
author | Susan LoVerso <sue@mongodb.com> | 2016-03-01 12:50:15 -0500 |
---|---|---|
committer | Susan LoVerso <sue@mongodb.com> | 2016-03-01 12:50:15 -0500 |
commit | 5229ef8d6b2e42b7a19e701b58e549f1b8b9bafd (patch) | |
tree | 716808715724831f58d03e7b513fac66d2ff7d09 | |
parent | f6d0fa3645eb3f2b9932ffac9c287bba52052e04 (diff) | |
download | mongo-5229ef8d6b2e42b7a19e701b58e549f1b8b9bafd.tar.gz |
WT-2437 Adjust expected error messages to support Windows.
Look for WT-specific portion of the message or detect Posix/Windows.
-rw-r--r-- | test/suite/test_backup05.py | 8 | ||||
-rw-r--r-- | test/suite/test_checkpoint01.py | 2 | ||||
-rw-r--r-- | test/suite/test_cursor06.py | 2 | ||||
-rw-r--r-- | test/suite/test_cursor_random.py | 2 | ||||
-rw-r--r-- | test/suite/test_join01.py | 2 | ||||
-rw-r--r-- | test/suite/test_readonly02.py | 4 | ||||
-rw-r--r-- | test/suite/test_readonly03.py | 2 |
7 files changed, 8 insertions, 14 deletions
diff --git a/test/suite/test_backup05.py b/test/suite/test_backup05.py index 8ffeb6752df..991a9f71b19 100644 --- a/test/suite/test_backup05.py +++ b/test/suite/test_backup05.py @@ -44,14 +44,6 @@ class test_backup05(wttest.WiredTigerTestCase, suite_subprocess): create_params = 'key_format=i,value_format=i' freq = 5 - def copy_windows(self, olddir, newdir): - os.mkdir(newdir) - for fname in os.listdir(olddir): - fullname = os.path.join(olddir, fname) - # Skip lock file on Windows since it is locked - if os.path.isfile(fullname) and "WiredTiger.lock" not in fullname: - shutil.copy(fullname, newdir) - def check_manual_backup(self, i, olddir, newdir): ''' Simulate a manual backup from olddir and restart in newdir. ''' self.session.checkpoint() diff --git a/test/suite/test_checkpoint01.py b/test/suite/test_checkpoint01.py index 36f1ef733a4..9955944f73d 100644 --- a/test/suite/test_checkpoint01.py +++ b/test/suite/test_checkpoint01.py @@ -265,7 +265,7 @@ class test_checkpoint_cursor_update(wttest.WiredTigerTestCase): cursor = self.session.open_cursor(self.uri, None, "checkpoint=ckpt") cursor.set_key(key_populate(cursor, 10)) cursor.set_value("XXX") - msg = "/not supported/" + msg = "/Unsupported cursor/" self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: cursor.insert(), msg) self.assertRaisesWithMessage(wiredtiger.WiredTigerError, diff --git a/test/suite/test_cursor06.py b/test/suite/test_cursor06.py index d702f97c5dd..5545c862dd7 100644 --- a/test/suite/test_cursor06.py +++ b/test/suite/test_cursor06.py @@ -89,7 +89,7 @@ class test_cursor06(wttest.WiredTigerTestCase): self.session.drop(uri, "force") self.populate(uri) cursor = self.session.open_cursor(uri, None, open_config) - msg = '/not supported/' + msg = '/Unsupported cursor/' if open_config == "readonly=1": self.set_kv(cursor) self.assertRaisesWithMessage(wiredtiger.WiredTigerError, diff --git a/test/suite/test_cursor_random.py b/test/suite/test_cursor_random.py index cd91a925b0c..16ce5cae685 100644 --- a/test/suite/test_cursor_random.py +++ b/test/suite/test_cursor_random.py @@ -51,7 +51,7 @@ class test_cursor_random(wttest.WiredTigerTestCase): uri = self.type self.session.create(uri, 'key_format=S,value_format=S') cursor = self.session.open_cursor(uri, None, self.config) - msg = "/not supported/" + msg = "/Unsupported cursor/" self.assertRaisesWithMessage( wiredtiger.WiredTigerError, lambda: cursor.compare(cursor), msg) self.assertRaisesWithMessage( diff --git a/test/suite/test_join01.py b/test/suite/test_join01.py index 7630706379c..539a3a3ae57 100644 --- a/test/suite/test_join01.py +++ b/test/suite/test_join01.py @@ -341,7 +341,7 @@ class test_join01(wttest.WiredTigerTestCase): '/index cursor is being used in a join/') # Only a small number of operations allowed on a join cursor - msg = "/not supported/" + msg = "/Unsupported cursor/" self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: jc.search(), msg) diff --git a/test/suite/test_readonly02.py b/test/suite/test_readonly02.py index 309c14752ac..0df5465642d 100644 --- a/test/suite/test_readonly02.py +++ b/test/suite/test_readonly02.py @@ -66,8 +66,10 @@ class test_readonly02(wttest.WiredTigerTestCase, suite_subprocess): if self.create: # 1. setting readonly on a new database directory # Setting readonly prevents creation so we should see an - # ENOENT error because the lock file does not exist. + # error because the lock file does not exist. msg = '/No such file/' + if os.name != 'posix': + msg = '/cannot find the file/' os.mkdir(rdonlydir) self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: self.wiredtiger_open( diff --git a/test/suite/test_readonly03.py b/test/suite/test_readonly03.py index 981a21d51ac..d9930e8f553 100644 --- a/test/suite/test_readonly03.py +++ b/test/suite/test_readonly03.py @@ -68,7 +68,7 @@ class test_readonly03(wttest.WiredTigerTestCase, suite_subprocess): # Now close and reopen. Note that the connection function # above will reopen it readonly. self.reopen_conn() - msg = '/not supported/' + msg = '/Unsupported/' c = self.session.open_cursor(self.uri, None, None) for op in self.cursor_ops: c.set_key(1) |