kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nehanarkh...@apache.org
Subject kafka git commit: KAFKA-1746 System tests don't handle errors well; reviewed by Neha Narkhede
Date Fri, 07 Nov 2014 02:16:25 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 06e1a6552 -> cbdcd5f10


KAFKA-1746 System tests don't handle errors well; reviewed by Neha Narkhede


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/cbdcd5f1
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/cbdcd5f1
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/cbdcd5f1

Branch: refs/heads/trunk
Commit: cbdcd5f108d783e9d0e758fbf0d8479968db3a68
Parents: 06e1a65
Author: Ewen Cheslack-Postava <me@ewencp.org>
Authored: Thu Nov 6 18:16:13 2014 -0800
Committer: Neha Narkhede <neha.narkhede@gmail.com>
Committed: Thu Nov 6 18:16:17 2014 -0800

----------------------------------------------------------------------
 system_test/mirror_maker_testsuite/mirror_maker_test.py           | 1 +
 system_test/offset_management_testsuite/offset_management_test.py | 1 +
 system_test/replication_testsuite/replica_basic_test.py           | 2 ++
 system_test/system_test_runner.py                                 | 2 +-
 system_test/utils/kafka_system_test_utils.py                      | 3 +++
 5 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/cbdcd5f1/system_test/mirror_maker_testsuite/mirror_maker_test.py
----------------------------------------------------------------------
diff --git a/system_test/mirror_maker_testsuite/mirror_maker_test.py b/system_test/mirror_maker_testsuite/mirror_maker_test.py
index c0117c6..48f9ff6 100644
--- a/system_test/mirror_maker_testsuite/mirror_maker_test.py
+++ b/system_test/mirror_maker_testsuite/mirror_maker_test.py
@@ -315,6 +315,7 @@ class MirrorMakerTest(ReplicationUtils, SetupUtils):
             except Exception as e:
                 self.log_message("Exception while running test {0}".format(e))
                 traceback.print_exc()
+                self.testcaseEnv.validationStatusDict["Test completed"] = "FAILED"
 
             finally:
                 if not skipThisTestCase and not self.systemTestEnv.printTestDescriptionsOnly:

http://git-wip-us.apache.org/repos/asf/kafka/blob/cbdcd5f1/system_test/offset_management_testsuite/offset_management_test.py
----------------------------------------------------------------------
diff --git a/system_test/offset_management_testsuite/offset_management_test.py b/system_test/offset_management_testsuite/offset_management_test.py
index 12b5cd2..aa38910 100644
--- a/system_test/offset_management_testsuite/offset_management_test.py
+++ b/system_test/offset_management_testsuite/offset_management_test.py
@@ -290,6 +290,7 @@ class OffsetManagementTest(ReplicationUtils, SetupUtils):
             except Exception as e:
                 self.log_message("Exception while running test {0}".format(e))
                 traceback.print_exc()
+                self.testcaseEnv.validationStatusDict["Test completed"] = "FAILED"
 
             finally:
                 if not skipThisTestCase and not self.systemTestEnv.printTestDescriptionsOnly:

http://git-wip-us.apache.org/repos/asf/kafka/blob/cbdcd5f1/system_test/replication_testsuite/replica_basic_test.py
----------------------------------------------------------------------
diff --git a/system_test/replication_testsuite/replica_basic_test.py b/system_test/replication_testsuite/replica_basic_test.py
index 660006c..16a24a4 100644
--- a/system_test/replication_testsuite/replica_basic_test.py
+++ b/system_test/replication_testsuite/replica_basic_test.py
@@ -451,6 +451,8 @@ class ReplicaBasicTest(ReplicationUtils, SetupUtils):
             except Exception as e:
                 self.log_message("Exception while running test {0}".format(e))
                 traceback.print_exc()
+                self.testcaseEnv.validationStatusDict["Test completed"] = "FAILED"
+
 
             finally:
                 if not skipThisTestCase and not self.systemTestEnv.printTestDescriptionsOnly:

http://git-wip-us.apache.org/repos/asf/kafka/blob/cbdcd5f1/system_test/system_test_runner.py
----------------------------------------------------------------------
diff --git a/system_test/system_test_runner.py b/system_test/system_test_runner.py
index ee7aa25..5078d44 100644
--- a/system_test/system_test_runner.py
+++ b/system_test/system_test_runner.py
@@ -199,6 +199,6 @@ def main():
 # main entry point
 # =========================
 
-main()
+sys.exit(main())
 
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/cbdcd5f1/system_test/utils/kafka_system_test_utils.py
----------------------------------------------------------------------
diff --git a/system_test/utils/kafka_system_test_utils.py b/system_test/utils/kafka_system_test_utils.py
index 1093b66..41d511c 100644
--- a/system_test/utils/kafka_system_test_utils.py
+++ b/system_test/utils/kafka_system_test_utils.py
@@ -2400,6 +2400,9 @@ def validate_index_log(systemTestEnv, testcaseEnv, clusterName="source"):
                                 logger.debug("#### error found [" + line + "]", extra=d)
                                 failureCount += 1
                                 showMismatchedIndexOffset = True
+                        if subproc.wait() != 0:
+                            logger.debug("#### error found [DumpLogSegments exited abnormally]",
extra=d)
+                            failureCount += 1
 
     if failureCount == 0:
         validationStatusDict["Validate index log in cluster [" + clusterName + "]"] = "PASSED"


Mime
View raw message