This project is intended to make testing the PPM easier.
The objective here is to verify the following:
- BSMs inside the geofence are retained
- BSMs with a partII section are retained
- BSMs outside the geofence are suppressed
- BSMs above the speed range are suppressed
- BSMs below the speed range are suppressed
-
Make sure that the KAFKA_HOST environment variable is set to the IP address of the WSL instance running the PPM. This should be set in the WSL instance running the testing-ppm project. If you run into trouble, setting this to
localhost
may help. -
Make sure that the DOCKER_HOST_IP environment variable is set to the IP address of the WSL instance running the PPM. It should be noted that environment variables in the .env file will override the environment variables set in the WSL instance, so if the .env file is being used, the DOCKER_HOST_IP environment variable should be set in the .env file.
-
Spin up PPM using standalone docker-compose script.
docker-compose -f docker-compose-standalone.yml up --build --remove-orphans
- Send test BSMs by invoking the test.sh script or the send_bsm.sh script.
- Observe the result by checking the info.log file in the logs directory in the container or by checking the terminal running the consumer.
-
Spin up PPM using standalone docker-compose script.
docker-compose -f docker-compose-standalone.yml up --build --remove-orphans
-
Exec into the container running kafka in two separate terminals.
docker ps docker exec -it (container ID) /bin/bash
-
Navigate to the
/opt/kafka/bin
directory.cd /opt/kafka/bin
-
On one terminal, start reading from the topic.
kafka-console-consumer --bootstrap-server localhost:9092 --topic (topic name) --from-beginning
-
On the other terminal, start writing to the topic.
kafka-console-producer --bootstrap-server localhost:9092 --topic (topic name)
- Write test BSMs (located in the bsms directory) to the topic.
- Verify that the BSMs are written to the topic.
- Observe the result by checking the info.log file in the logs directory in the container or by checking the terminal running the consumer.