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: Refactor test to reuse LocalRegistryFile #2763

Merged
merged 1 commit into from
Jun 7, 2022
Merged
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 @@ -28,11 +28,9 @@
import feast.proto.serving.ServingAPIProto;
import feast.proto.serving.ServingAPIProto.FieldStatus;
import feast.proto.types.ValueProto;
import feast.serving.registry.LocalRegistryFile;
import feast.serving.util.DataGenerator;
import io.grpc.StatusRuntimeException;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -62,14 +60,8 @@ protected ServingAPIProto.GetOnlineFeaturesRequest buildOnlineRequest(int driver
static RegistryProto.Registry registryProto = readLocalRegistry();

private static RegistryProto.Registry readLocalRegistry() {
try {
return RegistryProto.Registry.parseFrom(
Files.readAllBytes(Paths.get("src/test/resources/docker-compose/feast10/registry.db")));
} catch (IOException e) {
e.printStackTrace();
}

return null;
return new LocalRegistryFile("src/test/resources/docker-compose/feast10/registry.db")
.getContent();
}

@Test
Expand Down