<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><br><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Gustavo Fernandes" &lt;gustavo@infinispan.org&gt;<br><b>To: </b>"infinispan -Dev List" &lt;infinispan-dev@lists.jboss.org&gt;<br><b>Sent: </b>Friday, September 30, 2016 5:58:27 AM<br><b>Subject: </b>Re: [infinispan-dev] Hot Rod testing<br><div><br></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><div><br><div><br></div></div></span><div>I wonder if something like Haxe [1] could help here in defining a language agnostic <br></div><div>TCK (maybe an skeleton?) that gets compiled to several platforms. Each platform's <br>testsuite would them "implement" the spec and of course would be free to add <br>'native' tests as well. There's also a unit test framework built on top of [1], worth exploring<br></div><div><br>[1] <a href="https://haxe.org/" target="_blank">https://haxe.org/</a><br></div><div>[2] <a href="https://github.com/massiveinteractive/MassiveUnit/" target="_blank">https://github.com/massiveinteractive/MassiveUnit/</a><br><div><br></div></div></div></div></div></blockquote><div><br></div><div>This is an idea of how to use it:<br></div><div><br></div><div>1) Define an interface using the Haxe language (just assume syntax is correct):<br><div><br></div></div><div>interface IHotRodClient {<br></div><div>&nbsp;&nbsp; get(Object k)<br></div><div>&nbsp;&nbsp; put(Object k, Object value)<br></div><div>&nbsp;&nbsp; etc<br></div><div>}<br></div><div><br></div><div>2) Write the TCK in terms of that interface. The Haxe language has lots of libraries, including unit tests:<br></div><div><br></div><div>class TCK {<br><div><br></div></div><div>&nbsp;&nbsp; test1( ) { ... }<br></div><div>&nbsp;&nbsp; test2( ) { ... }<br></div><div>&nbsp;&nbsp; etc<br></div><div><br></div><div>&nbsp;&nbsp; void Main(IHotRodClient client)<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new TCK(client).run()<br></div><div>}<br></div><div><br></div><div>3) Cross compile the TCK and distribute it as jar, dll, js, etc<br></div><div>4) Each Hot Rod client consumes the artifact above<br></div><div>5) Each Hot Rod runs the TCK passing its implementation of IHotRodClient</div><div>6) Profit</div></div></div></div></blockquote><div>It takes 6 steps to profit?!</div><div><br></div><div>I think the idea of writing the TCK once and being able to generate the code in the native language of the client is a great idea. The issue will be when we have a Hot Rod client in a language that Haxe doesn't support. (Go?)</div><div><br></div><div>Thanks,</div><div>Alan</div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div><br></div><div>My 2p,<br></div><div>Gustavo<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><br></blockquote></span><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>
Tristan<br><br>
--<br>
Tristan Tarrant<br>
Infinispan Lead<br>
JBoss, a division of Red Hat<br><br>
_______________________________________________<br>
infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></div></div></blockquote></span></div><br></div></div></blockquote></div><br></div></div><br>_______________________________________________<br>infinispan-dev mailing list<br>infinispan-dev@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/infinispan-dev</blockquote><br></div></body></html>