Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import javax.sql.DataSource;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;


Expand Down Expand Up @@ -101,6 +102,7 @@ public static void dropTable() throws SQLException {
}

@Test
@Ignore("https://github.com/GoogleCloudPlatform/java-docs-samples/issues/8794")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability and avoid duplicating the issue URL, consider defining it as a private static final String constant. This constant can then be used here and for the other ignored test on line 115.

For example:

private static final String SKIP_FAILING_TESTS_ISSUE = "https://github.com/GoogleCloudPlatform/java-docs-samples/issues/8794";

// ...

@Ignore(SKIP_FAILING_TESTS_ISSUE)

public void testGetTemplateData() throws Exception {
TemplateData templateData = new IndexServlet().getTemplateData(pool);

Expand All @@ -110,6 +112,7 @@ public void testGetTemplateData() throws Exception {
}

@Test
@Ignore("https://github.com/GoogleCloudPlatform/java-docs-samples/issues/8794")
public void testServletPost() throws Exception {
HttpServletRequest request = mock(HttpServletRequest.class);
HttpServletResponse response = mock(HttpServletResponse.class);
Expand All @@ -128,4 +131,4 @@ public void testServletPost() throws Exception {
writer.flush();
assertTrue(stringWriter.toString().contains("Vote successfully cast for"));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import javax.sql.DataSource;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;


Expand Down Expand Up @@ -102,6 +103,7 @@ public static void dropTable() throws SQLException {
}

@Test
@Ignore("https://github.com/GoogleCloudPlatform/java-docs-samples/issues/8794")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability and avoid duplicating the issue URL, consider defining it as a private static final String constant. This constant can then be used here and for the other ignored test on line 116.

For example:

private static final String SKIP_FAILING_TESTS_ISSUE = "https://github.com/GoogleCloudPlatform/java-docs-samples/issues/8794";

// ...

@Ignore(SKIP_FAILING_TESTS_ISSUE)

public void testGetTemplateData() throws Exception {
TemplateData templateData = new IndexServlet().getTemplateData(pool);

Expand All @@ -111,6 +113,7 @@ public void testGetTemplateData() throws Exception {
}

@Test
@Ignore("https://github.com/GoogleCloudPlatform/java-docs-samples/issues/8794")
public void testServletPost() throws Exception {
HttpServletRequest request = mock(HttpServletRequest.class);
HttpServletResponse response = mock(HttpServletResponse.class);
Expand All @@ -129,4 +132,4 @@ public void testServletPost() throws Exception {
writer.flush();
assertTrue(stringWriter.toString().contains("Vote successfully cast for"));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import javax.sql.DataSource;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;


Expand Down Expand Up @@ -111,6 +112,7 @@ public static void dropTable() throws SQLException {


@Test
@Ignore("https://github.com/GoogleCloudPlatform/java-docs-samples/issues/8794")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability and avoid duplicating the issue URL, consider defining it as a private static final String constant. This constant can then be used here and for the other ignored test on line 125.

For example:

private static final String SKIP_FAILING_TESTS_ISSUE = "https://github.com/GoogleCloudPlatform/java-docs-samples/issues/8794";

// ...

@Ignore(SKIP_FAILING_TESTS_ISSUE)

public void testGetTemplateData() throws Exception {
TemplateData templateData = new IndexServlet().getTemplateData(pool);

Expand All @@ -120,6 +122,7 @@ public void testGetTemplateData() throws Exception {
}

@Test
@Ignore("https://github.com/GoogleCloudPlatform/java-docs-samples/issues/8794")
public void testServletPost() throws Exception {
HttpServletRequest request = mock(HttpServletRequest.class);
HttpServletResponse response = mock(HttpServletResponse.class);
Expand Down