You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2018/12/10 12:13:23 UTC

[incubator-plc4x] branch develop updated: Try to get the email sending working - Intentionally added a test-failure

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new b28d4a0  Try to get the email sending working - Intentionally added a test-failure
b28d4a0 is described below

commit b28d4a0a93dca54267157eeae759e0ed08aa6a29
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Dec 10 13:13:13 2018 +0100

    Try to get the email sending working
    - Intentionally added a test-failure
---
 Jenkinsfile                                                       | 8 +++++++-
 .../org/apache/plc4x/java/s7/connection/S7PlcConnectionIT.java    | 3 +++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 2b43b5f..54c6459 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -201,11 +201,17 @@ pipeline {
             emailext (
                 subject: "[BUILD-FAILURE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
                 body: """<p>BUILD-FAILURE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]':</p><p>Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]</a>"</p>""",
+                to: "dev@plc4x.apache.org",
                 recipientProviders: [[$class: 'DevelopersRecipientProvider']]
             )
         }
         unstable {
-            sh 'echo "This will run only if the run was marked as unstable"'
+            emailext (
+                subject: "[BUILD-UNSTABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
+                body: """<p>BUILD-UNSTABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]':</p><p>Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]</a>"</p>""",
+                to: "dev@plc4x.apache.org",
+                recipientProviders: [[$class: 'DevelopersRecipientProvider']]
+            )
         }
     }
 
diff --git a/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/connection/S7PlcConnectionIT.java b/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/connection/S7PlcConnectionIT.java
index 8d07a4a..7109edb 100644
--- a/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/connection/S7PlcConnectionIT.java
+++ b/plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/connection/S7PlcConnectionIT.java
@@ -34,6 +34,7 @@ import java.util.concurrent.TimeUnit;
 import static org.hamcrest.core.IsEqual.equalTo;
 import static org.hamcrest.core.IsNull.notNullValue;
 import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
 
 public class S7PlcConnectionIT {
 
@@ -126,6 +127,8 @@ public class S7PlcConnectionIT {
         assertThat(response, notNullValue());
 
         SUT.close();
+
+        fail("Intentionally failing this test in order to test the email notifications");
     }
 
 }