From d279e2998c352e2de04480fbe0879d7d44a99e54 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Wed, 7 Oct 2020 08:01:00 +0100 Subject: [PATCH 01/11] Add readme --- README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 From 6172286d584026610de75f038f025b719af9ad7a Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Sat, 10 Oct 2020 08:54:45 +0100 Subject: [PATCH 02/11] Lots of passing --- src/test/java/com/github/App2Test.java | 87 ++++++++++++++++++++++++++ src/test/java/com/github/AppTest.java | 57 ++++++++++++++++- 2 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 src/test/java/com/github/App2Test.java diff --git a/src/test/java/com/github/App2Test.java b/src/test/java/com/github/App2Test.java new file mode 100644 index 0000000..c4a31fc --- /dev/null +++ b/src/test/java/com/github/App2Test.java @@ -0,0 +1,87 @@ +package com.github; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Collections; +import java.util.List; +import org.junit.Test; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +/** + * Unit test for simple App. + */ +public class App2Test { + /** + * Rigorous Test :-) + */ + @Test + public void attachment() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment2() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment3() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment4() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment5() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment6() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } +} diff --git a/src/test/java/com/github/AppTest.java b/src/test/java/com/github/AppTest.java index 0c0ad05..f7a3756 100644 --- a/src/test/java/com/github/AppTest.java +++ b/src/test/java/com/github/AppTest.java @@ -29,6 +29,61 @@ public void attachment() throws IOException { System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); - assertThat(false, is(true)); + assertThat(true, is(true)); + } + + @Test + public void attachment2() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment3() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment4() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment5() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment6() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); } } From 8f6b98fff27053d9cfc7d2c5da451653019cf143 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Fri, 5 Feb 2021 23:01:15 +0000 Subject: [PATCH 03/11] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e69de29..ef0493b 100644 --- a/README.md +++ b/README.md @@ -0,0 +1 @@ +hello From b67aa27db47bec9e1c77b16682c1039594529c88 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Tue, 6 Apr 2021 08:28:35 +0100 Subject: [PATCH 04/11] Update Jenkinsfile --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 5122fe1..d990082 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,6 +6,8 @@ pipeline { steps { // Run Maven on a Unix agent. sh "mvn -Dmaven.test.failure.ignore=true clean verify" + sh "sleep 10s" + sh "echo 'slept'" } post { From 6414c4483935a2fda56b193353233eced6d5dd3b Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Tue, 6 Apr 2021 08:29:48 +0100 Subject: [PATCH 05/11] Update Jenkinsfile --- Jenkinsfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d990082..5122fe1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,8 +6,6 @@ pipeline { steps { // Run Maven on a Unix agent. sh "mvn -Dmaven.test.failure.ignore=true clean verify" - sh "sleep 10s" - sh "echo 'slept'" } post { From cc9cefbee2fe97de06a14fd3ed2feecdae510143 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Tue, 6 Apr 2021 08:33:44 +0100 Subject: [PATCH 06/11] Update Jenkinsfile --- Jenkinsfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 5122fe1..803378b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,5 +17,15 @@ pipeline { } } } + stage('Sleep') { + steps { + sh "sleep 3s" + } + } + stage('Sleep2') { + steps { + sh "sleep 4s" + } + } } } From 5ef81b59a322eac5fdfc46cf4d957676fdb44735 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Thu, 20 May 2021 08:44:12 +0100 Subject: [PATCH 07/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a01b70..61de40e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # junit-attachments-test -hello +hello world From 51c2645ec44d8b70dba3f546c091c3f99d730bf7 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:53:12 +0100 Subject: [PATCH 08/11] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 803378b..60f1dd1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,7 +24,7 @@ pipeline { } stage('Sleep2') { steps { - sh "sleep 4s" + sh "sleep 4" } } } From 762744cfd8bdb9e20d3b3607f92bd80a0e47ad09 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:53:18 +0100 Subject: [PATCH 09/11] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 60f1dd1..9f4eb09 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,7 +19,7 @@ pipeline { } stage('Sleep') { steps { - sh "sleep 3s" + sh "sleep 3" } } stage('Sleep2') { From 77a64c7e6cec24c3960dc898177d93ff311d0e86 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:54:00 +0100 Subject: [PATCH 10/11] Update Jenkinsfile --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 9f4eb09..6a8dafe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,6 +4,7 @@ pipeline { stages { stage('Build') { steps { + sh "sleep 20" // Run Maven on a Unix agent. sh "mvn -Dmaven.test.failure.ignore=true clean verify" } From 8784d7497e5c6a0559e2ce7a0fd7425455051515 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Mon, 13 May 2024 15:01:03 +0100 Subject: [PATCH 11/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 61de40e..2a93607 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # junit-attachments-test -hello world +hello world2