Skip to content

Commit

Permalink
fixup: using toxiproxy
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Schrottner <[email protected]>
  • Loading branch information
aepfli committed Jan 14, 2025
1 parent b7cb52a commit 7c88905
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package dev.openfeature.contrib.providers.flagd.e2e;

import com.github.dockerjava.api.command.PauseContainerCmd;
import com.github.dockerjava.api.command.SyncDockerCmd;
import com.github.dockerjava.api.command.UnpauseContainerCmd;
import dev.openfeature.contrib.providers.flagd.Config;
import java.io.File;
import java.nio.file.Files;
import java.util.List;
Expand All @@ -14,12 +10,6 @@
import org.testcontainers.utility.DockerImageName;
import org.testcontainers.utility.MountableFile;

import java.io.File;
import java.nio.file.Files;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;

public class FlagdContainer extends GenericContainer<FlagdContainer> {
private static final String version;
private static final Network network = Network.newNetwork();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.junit.platform.suite.api.IncludeEngines;
import org.junit.platform.suite.api.IncludeTags;
import org.junit.platform.suite.api.SelectFile;
import org.junit.platform.suite.api.SelectFile;
import org.junit.platform.suite.api.Suite;
import org.testcontainers.junit.jupiter.Testcontainers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import dev.openfeature.sdk.MutableContext;
import java.util.LinkedList;
import java.util.List;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;

public class State {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.LinkedList;

import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.awaitility.Awaitility.await;

@Isolated()
public class EventSteps extends AbstractSteps {
private static final Logger LOG = LoggerFactory.getLogger(EventSteps.class);
Expand All @@ -32,7 +26,7 @@ public EventSteps(State state) {
@Given("a {} event handler")
public void a_stale_event_handler(String eventType) {
state.client.on(mapEventType(eventType), eventDetails -> {
LOG.info("event tracked for {} ", eventType);
LOG.info("event tracked for {} ", eventType);
state.events.add(new Event(eventType, eventDetails));
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@
import io.cucumber.java.BeforeAll;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.When;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.parallel.Isolated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.containers.BindMode;
import org.testcontainers.containers.Network;
import org.testcontainers.containers.ToxiproxyContainer;
import org.testcontainers.shaded.org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
Expand Down Expand Up @@ -131,7 +122,6 @@ public int getPort(Config.Resolver resolver, ProviderType providerType) {
}
}


@Given("a {} flagd provider")
public void setupProvider(String providerType) {
state.builder.deadline(500).keepAlive(0).retryGracePeriod(1);
Expand Down

0 comments on commit 7c88905

Please sign in to comment.