Skip to content
Open
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 @@ -51,6 +51,7 @@
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
Expand Down Expand Up @@ -104,6 +105,7 @@ public void tearDown() {
}

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

Choose a reason for hiding this comment

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

medium

Since all tests in this class are being ignored for the same reason, it would be cleaner to add a single @Ignore annotation to the SamplesTest class instead of annotating each test method individually. This would make the code more concise and easier to maintain when the tests are re-enabled. Please remove this annotation and add @Ignore("https://github.com/GoogleCloudPlatform/java-docs-samples/issues/10180") to the SamplesTest class.

public void testCreateNote() throws Exception {
// note should have been created as part of set up. verify that it succeeded
Note n = GetNote.getNote(noteId, PROJECT_ID);
Expand All @@ -112,6 +114,7 @@ public void testCreateNote() throws Exception {
}

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

Choose a reason for hiding this comment

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

medium

As per the suggestion on testCreateNote, a single class-level @Ignore annotation should be used. Please remove this redundant method-level annotation.

public void testDeleteNote() throws Exception {
DeleteNote.deleteNote(noteId, PROJECT_ID);
try {
Expand All @@ -124,6 +127,7 @@ public void testDeleteNote() throws Exception {
}

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

Choose a reason for hiding this comment

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

medium

As per the suggestion on testCreateNote, a single class-level @Ignore annotation should be used. Please remove this redundant method-level annotation.

public void testCreateOccurrence() throws Exception {
Occurrence o = CreateOccurrence.createOccurrence(imageUrl, noteId, PROJECT_ID, PROJECT_ID);
String[] nameArr = o.getName().split("/");
Expand All @@ -136,6 +140,7 @@ public void testCreateOccurrence() throws Exception {
}

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

Choose a reason for hiding this comment

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

medium

As per the suggestion on testCreateNote, a single class-level @Ignore annotation should be used. Please remove this redundant method-level annotation.

public void testDeleteOccurrence() throws Exception {
Occurrence o = CreateOccurrence.createOccurrence(imageUrl, noteId, PROJECT_ID, PROJECT_ID);
String occName = o.getName();
Expand All @@ -154,6 +159,7 @@ public void testDeleteOccurrence() throws Exception {
}

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

Choose a reason for hiding this comment

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

medium

As per the suggestion on testCreateNote, a single class-level @Ignore annotation should be used. Please remove this redundant method-level annotation.

public void testOccurrencesForImage() throws Exception {
int newCount;
int tries = 0;
Expand All @@ -175,6 +181,7 @@ public void testOccurrencesForImage() throws Exception {
}

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

Choose a reason for hiding this comment

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

medium

As per the suggestion on testCreateNote, a single class-level @Ignore annotation should be used. Please remove this redundant method-level annotation.

public void testOccurrencesForNote() throws Exception {
int newCount;
int tries = 0;
Expand All @@ -196,6 +203,7 @@ public void testOccurrencesForNote() throws Exception {
}

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

Choose a reason for hiding this comment

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

medium

As per the suggestion on testCreateNote, a single class-level @Ignore annotation should be used. Please remove this redundant method-level annotation.

public void testPubSub() throws Exception {
// create new topic and subscription if needed
try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
Expand Down Expand Up @@ -244,6 +252,7 @@ public void testPubSub() throws Exception {
}

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

Choose a reason for hiding this comment

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

medium

As per the suggestion on testCreateNote, a single class-level @Ignore annotation should be used. Please remove this redundant method-level annotation.

public void testPollDiscoveryOccurrenceFinished() throws Exception {
try {
// expect fail on first try
Expand Down Expand Up @@ -301,6 +310,7 @@ public void testPollDiscoveryOccurrenceFinished() throws Exception {
}

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

Choose a reason for hiding this comment

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

medium

As per the suggestion on testCreateNote, a single class-level @Ignore annotation should be used. Please remove this redundant method-level annotation.

public void testFindVulnerabilitiesForImage() throws Exception {
List<Occurrence> result =
VulnerabilityOccurrencesForImage.findVulnerabilityOccurrencesForImage(imageUrl, PROJECT_ID);
Expand All @@ -323,6 +333,7 @@ public void testFindVulnerabilitiesForImage() throws Exception {
}

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

Choose a reason for hiding this comment

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

medium

As per the suggestion on testCreateNote, a single class-level @Ignore annotation should be used. Please remove this redundant method-level annotation.

public void testFindHighSeverityVulnerabilitiesForImage() throws Exception {
// check before creation
List<Occurrence> result =
Expand Down