Skip to content

Commit 41a1da4

Browse files
authored
chore: Use latest Python code in Java Integration Tests (feast-dev#2645)
* Use latest python code in Java IT Signed-off-by: pyalex <moskalenko.alexey@gmail.com> * clean Signed-off-by: pyalex <moskalenko.alexey@gmail.com>
1 parent 10e23b4 commit 41a1da4

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

java/serving/src/test/java/feast/serving/it/ServingEnvironment.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
import java.io.File;
3434
import java.io.IOException;
3535
import java.net.ServerSocket;
36+
import java.time.Duration;
3637
import java.util.concurrent.TimeUnit;
3738
import org.junit.jupiter.api.AfterAll;
3839
import org.junit.jupiter.api.AfterEach;
3940
import org.junit.jupiter.api.BeforeAll;
4041
import org.junit.jupiter.api.BeforeEach;
4142
import org.testcontainers.containers.DockerComposeContainer;
42-
import org.testcontainers.containers.output.OutputFrame;
4343
import org.testcontainers.containers.wait.strategy.Wait;
4444
import org.testcontainers.junit.jupiter.Testcontainers;
4545

@@ -60,9 +60,9 @@ static void globalSetup() {
6060
new DockerComposeContainer(
6161
new File("src/test/resources/docker-compose/docker-compose-redis-it.yml"))
6262
.withExposedService("redis", 6379)
63-
.withExposedService("feast", 8080)
64-
.waitingFor("feast", Wait.forListeningPort())
65-
.withLogConsumer("feast", f -> System.out.print(((OutputFrame) f).getUtf8String()));
63+
.withExposedService(
64+
"feast", 8080, Wait.forListeningPort().withStartupTimeout(Duration.ofSeconds(180)))
65+
.withTailChildContainers(true);
6666
environment.start();
6767
}
6868

java/serving/src/test/resources/docker-compose/docker-compose-redis-it.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ services:
1212
- "8080"
1313
links:
1414
- redis
15+
volumes:
16+
- $PWD/../../../../../../:/mnt/feast
1517

java/serving/src/test/resources/docker-compose/feast10/Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ WORKDIR /usr/src/
55
COPY requirements.txt ./
66
RUN pip install --no-cache-dir -r requirements.txt
77

8-
RUN git clone https://github.com/feast-dev/feast.git /root/feast
9-
RUN cd /root/feast/ && pip install -e '.[redis]'
10-
118
WORKDIR /app
129
COPY . .
1310
EXPOSE 8080
1411

15-
CMD ["/bin/sh", "-c", "python materialize.py && feast serve_transformations --port 8080"]
12+
CMD ["./entrypoint.sh"]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env sh
2+
3+
set -e
4+
5+
# feast root directory is expected to be mounted (eg, by docker compose)
6+
cd /mnt/feast
7+
pip install -e '.[redis]'
8+
9+
cd /app
10+
python materialize.py
11+
feast serve_transformations --port 8080

0 commit comments

Comments
 (0)