diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2014-12-22 09:35:15 +1100 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2014-12-22 09:35:15 +1100 |
commit | 4b9f5855d277b0a7d6b35d510de2b848cbda6433 (patch) | |
tree | dc11d619719c9ed5edd5454eae4843863a8a9dfb | |
parent | afd499a7091dab914463692dcc442a308740e33c (diff) | |
parent | 34126179f4856233a2bdea4c923b4bcc5b2e4070 (diff) | |
download | mongo-4b9f5855d277b0a7d6b35d510de2b848cbda6433.tar.gz |
Merge pull request #1502 from markbenvenuto/win_test_schema03
Skip test_schema03.py on Window since rlimits are unix specific
-rw-r--r-- | test/suite/test_schema03.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/test/suite/test_schema03.py b/test/suite/test_schema03.py index 48d8e6b2986..e650d8b6964 100644 --- a/test/suite/test_schema03.py +++ b/test/suite/test_schema03.py @@ -25,10 +25,17 @@ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. -import resource +import os import suite_random import wiredtiger, wtscenario, wttest +try: + # Windows does not getrlimit/setrlimit so we must catch the resource + # module load + import resource +except: + None + # test_schema03.py # Bigger, more 'randomly generated' schemas and data. # This test is complex. If it fails, rerun with modified values for @@ -190,7 +197,7 @@ class test_schema03(wttest.WiredTigerTestCase): created in various orders as much as the API allows. On some runs the connection will be closed and reopened at a particular point to test that the schemas (and data) are saved and read correctly. - + The test is run multiple times, using scenarios. The test always follows these steps: - table: create tables @@ -277,6 +284,9 @@ class test_schema03(wttest.WiredTigerTestCase): # This test requires a large number of open files. # Increase our resource limits before we start def setUp(self): + if os.name == "nt": + self.skipTest('Unix specific test skipped on Windows') + self.origFileLimit = resource.getrlimit(resource.RLIMIT_NOFILE) newlimit = (self.OPEN_FILE_LIMIT, self.origFileLimit[1]) if newlimit[0] > newlimit[1]: @@ -289,7 +299,7 @@ class test_schema03(wttest.WiredTigerTestCase): 'create,cache_size=100m,session_max=1000') self.pr(`conn`) return conn - + def tearDown(self): super(test_schema03, self).tearDown() resource.setrlimit(resource.RLIMIT_NOFILE, self.origFileLimit) |