Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8A84D1868D for ; Thu, 4 Jun 2015 19:07:39 +0000 (UTC) Received: (qmail 604 invoked by uid 500); 4 Jun 2015 19:07:39 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 568 invoked by uid 500); 4 Jun 2015 19:07:39 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 557 invoked by uid 99); 4 Jun 2015 19:07:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2015 19:07:39 +0000 Date: Thu, 4 Jun 2015 19:07:39 +0000 (UTC) From: "Joshua McKenzie (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-9418) Fix dtests on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-9418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joshua McKenzie updated CASSANDRA-9418: --------------------------------------- Attachment: 9418_tz_formatting.txt Issues w/json tests are two-fold: # comparisons are mismatched on Windows # Default timestamp formatting is different on Windows. Re: #1: python coerces line-endings on all print or write calls to platform-specific endings, CRLF in Windows' case, which subsequently causes failures during the regex change and comparison in doctest.check_output as \s$ doesn't match the \s^M$ on Windows output. In order to resolve this, I've opened a dtest PR to convert CRLF to LF in cqlsh_print on Windows: [PR|https://github.com/riptano/cassandra-dtest/pull/312] Re: #2: It turns out there's a bug in the interaction between python's strftime and Windows clibs, specifically w/regards to %z in strftime ([bug report|http://bugs.python.org/issue20010]) giving us a long string return on %z rather than the desired +/- vs. GMT. CASSANDRA-4746 dealt with a somewhat similar issue so I've piggybacked on that and attached a patch that will change the datetime formatter in cqlshlib to manually fix the TZ when on Windows and with a %z formatting flag. With the PR for dtest and the patch attached, all but 2 of the json tests are passing locally now. > Fix dtests on Windows > --------------------- > > Key: CASSANDRA-9418 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9418 > Project: Cassandra > Issue Type: Bug > Reporter: Joshua McKenzie > Assignee: Joshua McKenzie > Labels: Windows > Fix For: 2.2.x > > Attachments: 9418_tz_formatting.txt > > > There's a variety of infrastructural failures within dtest w/regards to windows that are causing tests to fail and those failures to cascade. > Error: failure to delete commit log after a test / ccm cluster is stopped: > {noformat} > Traceback (most recent call last): > File "C:\src\cassandra-dtest\dtest.py", line 452, in tearDown > self._cleanup_cluster() > File "C:\src\cassandra-dtest\dtest.py", line 172, in _cleanup_cluster > self.cluster.remove() > File "build\bdist.win-amd64\egg\ccmlib\cluster.py", line 212, in remove > shutil.rmtree(self.get_path()) > File "C:\Python27\lib\shutil.py", line 247, in rmtree > rmtree(fullname, ignore_errors, onerror) > File "C:\Python27\lib\shutil.py", line 247, in rmtree > rmtree(fullname, ignore_errors, onerror) > File "C:\Python27\lib\shutil.py", line 252, in rmtree > onerror(os.remove, fullname, sys.exc_info()) > File "C:\Python27\lib\shutil.py", line 250, in rmtree > os.remove(fullname) > WindowsError: [Error 5] Access is denied: 'c:\\temp\\dtest-4rxq2i\\test\\node1\\commitlogs\\CommitLog-5-1431969131917.log' > {noformat} > Cascading error: implication is that tests aren't shutting down correctly and subsequent tests cannot start: > {noformat} > 06:00:20 ERROR: test_incr_decr_super_remove (thrift_tests.TestMutations) > 06:00:20 ---------------------------------------------------------------------- > 06:00:20 Traceback (most recent call last): > 06:00:20 File "D:\jenkins\workspace\trunk_dtest_win32\cassandra-dtest\thrift_tests.py", line 55, in setUp > 06:00:20 cluster.start() > 06:00:20 File "build\bdist.win-amd64\egg\ccmlib\cluster.py", line 249, in start > 06:00:20 p = node.start(update_pid=False, jvm_args=jvm_args, profile_options=profile_options) > 06:00:20 File "build\bdist.win-amd64\egg\ccmlib\node.py", line 457, in start > 06:00:20 common.check_socket_available(itf) > 06:00:20 File "build\bdist.win-amd64\egg\ccmlib\common.py", line 341, in check_socket_available > 06:00:20 raise UnavailableSocketError("Inet address %s:%s is not available: %s" % (addr, port, msg)) > 06:00:20 UnavailableSocketError: Inet address 127.0.0.1:9042 is not available: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions > 06:00:20 -------------------- >> begin captured logging << -------------------- > 06:00:20 dtest: DEBUG: removing ccm cluster test at: d:\temp\dtest-a5iny5 > 06:00:20 dtest: DEBUG: cluster ccm directory: d:\temp\dtest-dalzcy > 06:00:20 --------------------- >> end captured logging << --------------------- > {noformat} > I've also seen (and am debugging) an error where a node just fails to start via ccm. > I'll update this ticket with PR's to dtest or other observations of interest. -- This message was sent by Atlassian JIRA (v6.3.4#6332)