ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivasilin...@apache.org
Subject [1/2] incubator-ignite git commit: #ignite-961: add javadoc for JettyRestProcessorAbstractSelfTest.makePostRequest
Date Fri, 17 Jul 2015 10:39:20 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-961 e134cd979 -> 7b793af9d


#ignite-961: add javadoc for JettyRestProcessorAbstractSelfTest.makePostRequest


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3d94e849
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3d94e849
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3d94e849

Branch: refs/heads/ignite-961
Commit: 3d94e849c118aa89a108dac91c08e20bd9238e96
Parents: e134cd9
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Jul 17 13:30:02 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Jul 17 13:30:02 2015 +0300

----------------------------------------------------------------------
 .../rest/JettyRestProcessorAbstractSelfTest.java      | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3d94e849/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
index 04f4a2a..67913e4 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
@@ -101,7 +101,15 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
         return buf.toString();
     }
 
-    private String makePostRequest(Map<String, String> params, String urlParameters)
throws Exception {
+    /**
+     * Runs post request.
+     *
+     * @param params Url parameters.
+     * @param postParams Post parameters.
+     * @return Request result.
+     * @throws Exception If failed.
+     */
+    private String makePostRequest(Map<String, String> params, String postParams) throws
Exception {
         String addr = "http://" + LOC_HOST + ":" + restPort() + "/ignite?";
 
         for (Map.Entry<String, String> e : params.entrySet())
@@ -109,7 +117,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         URL url = new URL(addr);
 
-        byte[] data = urlParameters.getBytes(Charset.forName("UTF-8"));
+        byte[] data = postParams.getBytes(Charset.forName("UTF-8"));
 
         HttpURLConnection conn = (HttpURLConnection)url.openConnection();
 
@@ -130,7 +138,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
         conn.setDoOutput(true);
 
         try (PrintStream wr = new PrintStream(conn.getOutputStream())) {
-            wr.print(urlParameters);
+            wr.print(postParams);
             wr.flush();
             wr.close();
         }


Mime
View raw message