lewismc commented on issue #11: SDAP-36 MUDROD Storage unit test suite
URL: 
https://github.com/apache/incubator-sdap-mudrod/pull/11#issuecomment-385009566
 
 
   Hi @Yongyao couple of questions here
   
   1. I posted a direct link to an example of creating an [embedded ES 
server](http://cupofjava.de/blog/2012/11/27/embedded-elasticsearch-server-for-tests/)...
 this is what you need to create. This will then be used when unit tests are 
executed... makes sense?
   1. Is there any reason that @clarkgogogo is submitting code for a PR via 
your repository? That would seem to me to be missing the point of us bringing 
him on board for the summer. What happens when you are gone and no-one is able 
to manage PR's which come into your repository? It would be appreciated if you 
could point @clarkgogogo to the [CONTRIBUTING 
GUIDELINES](https://github.com/apache/incubator-sdap-mudrod/blob/master/CONTRIBUTING.md)
 such that he can understand and practice the development workflow himself.
   1. you state "...but he got stuck because the client he got through this 
approach is null."... this is because he did not create the embedded ES server 
as I stated and requested above
   1. you state "...I am actually a little confused with the embedded server 
approach. Why do you need it?" The answer is simple... it is so we can actually 
test the data persistence functionality within MUDROD. Unless we have a running 
instance of ES, we are unable to interact with any data... does this make sense?
   1. You stated "...The sample code you provided seems to create a ES client, 
which is the same as the one we created through ESdriver." No this is not 
correct, if you look at the following code, it clearly creates a ```Node``` 
object which is the ES data node.
   ```
       public EmbeddedElasticsearchServer(String dataDirectory) {
           this.dataDirectory = dataDirectory;
   
           ImmutableSettings.Builder elasticsearchSettings = 
ImmutableSettings.settingsBuilder()
                   .put("http.enabled", "false")
                   .put("path.data", dataDirectory);
   
           node = nodeBuilder()
                   .local(true)
                   .settings(elasticsearchSettings.build())
                   .node();
       }
   
   ```
   Once we've created the ```Node``` with ```@setUpClass``` then we can begin 
executing Unit tests against that Node.
   1. Final thing for now, for the ESDriverTest you guys have actually not 
tested anything at all. You are confusing use of the [Java 
assert](https://docs.oracle.com/javase/7/docs/technotes/guides/language/assert.html)
 with [JUnit's 
assert](https://junit.org/junit4/javadoc/latest/org/junit/Assert.html)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to