Gaffer
Gaffer copied to clipboard
Improve Federated Store Tests to make use of properties file
Describe the enhancement you'd like Throughout the Federated Store there are multiple instances of this code pattern in many places in various files: https://github.com/gchq/Gaffer/blob/ac602892435bdd0180f783c80f774149f50eb7f0/store-implementation/federated-store/src/test/java/uk/gov/gchq/gaffer/federatedstore/FederatedStoreVisibilityTest.java#L71-L72
These can all be replaced with a single line which loads a generic Federated Store config properties file (from test/resources) using the getFederatedStorePropertiesWithHashMapCache
utility method from FederatedStoreTestUtil
.
Why do you want this feature? To simplify the tests for this module.
Hi, i want to work on this issue. Could you assign this issue?
Hello, to resolve this issue I forked the repository and cloned it locally using SourceTree. I opened the code related to the issue, but there seems to be an import error. I would appreciate any advice on how to address this. Please reply when you have time.
Depending on the IDE used, it might require you to run a full build locally first. You can do this with mvn clean install -Pquick
. If you are using Windows then some tests may fail to run (Hadoop/Accumulo) as they are not compatible with Windows.
Thank you for the advice. I was able to build successfully using the mvn clean install -Pquick
command you suggested. The problem is that when I tried to run the FederatedStoreVisibilityTest test code, it failed the tests as shown in the screenshot. I installed Ubuntu and ran the tests there, but I'm still getting the same results as shown in the image.
Ensure you have Java 8 installed and configured as the Java version to use in your IDE. I did some brief research which indicates that that zookeeper error is caused by using a recent Java version. Java 11 is the latest which is officially supported, but 8 is recommended for now.