Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Test failures due to RESOURCE_EXHAUSTED #1197

Merged
merged 2 commits into from
Nov 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: Test failures due to RESOURCE_EXHAUSTED
  • Loading branch information
losalex committed Nov 15, 2022
commit 5c8d3cf20db08941979cb77f29c53fd2d4f83cde
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,24 @@
import com.google.cloud.logging.Sink;
import com.google.cloud.logging.SinkInfo;
import com.google.common.collect.Sets;
import java.util.Iterator;
import java.util.Set;
import org.junit.BeforeClass;
import org.junit.Test;

public class ITSinkTest extends BaseSystemTest {

@BeforeClass
public static void setUp() {
// Cleanup all stucked sinks if any
Logging.ListOption[] options = {Logging.ListOption.pageSize(50)};
Page<Sink> sinkPage = logging.listSinks(options);
Iterator<Sink> iterator = sinkPage.iterateAll().iterator();
while (iterator.hasNext()) {
iterator.next().delete();
}
}

@Test
public void testCreateGetUpdateAndDeleteSink() {
String name = formatForTest("test-create-get-update-sink");
Expand Down