[jira] [Commented] (THRIFT-4325) Simplify automake cross compilation by relying on one global THRIFT compiler path

2017-09-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16159701#comment-16159701
 ] 

ASF GitHub Bot commented on THRIFT-4325:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1336
  
I opened THRIFT-4325 for this.


> Simplify automake cross compilation by relying on one global THRIFT compiler 
> path
> -
>
> Key: THRIFT-4325
> URL: https://issues.apache.org/jira/browse/THRIFT-4325
> Project: Thrift
>  Issue Type: Improvement
>  Components: Build Process
>Affects Versions: 0.10.0
>Reporter: James E. King, III
>Priority: Minor
>
> Eliminates the assignment of THRIFT in every Makefile.am too.
> See: https://github.com/apache/thrift/pull/1336/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift issue #1336: configure.ac, Makefile.am: introduce THRIFT variable to ...

2017-09-08 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1336
  
I opened THRIFT-4325 for this.


---


[jira] [Resolved] (THRIFT-4292) TimerManager::remove() is not implemented

2017-09-08 Thread James E. King, III (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III resolved THRIFT-4292.

   Resolution: Fixed
 Assignee: James E. King, III
Fix Version/s: 0.11.0

> TimerManager::remove() is not implemented
> -
>
> Key: THRIFT-4292
> URL: https://issues.apache.org/jira/browse/THRIFT-4292
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Reporter: Francois Ferrand
>Assignee: James E. King, III
> Fix For: 0.11.0
>
>
> The function is currently not implemented.
> This is not critical for Thrift, since it is not used there, but prevents 
> using it in thrift-based code.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1337: THRIFT-4292: Implement TimerManager::remove()

2017-09-08 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/thrift/pull/1337


---


[jira] [Commented] (THRIFT-4292) TimerManager::remove() is not implemented

2017-09-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16159700#comment-16159700
 ] 

ASF GitHub Bot commented on THRIFT-4292:


Github user asfgit closed the pull request at:

https://github.com/apache/thrift/pull/1337


> TimerManager::remove() is not implemented
> -
>
> Key: THRIFT-4292
> URL: https://issues.apache.org/jira/browse/THRIFT-4292
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Reporter: Francois Ferrand
>Assignee: James E. King, III
> Fix For: 0.11.0
>
>
> The function is currently not implemented.
> This is not critical for Thrift, since it is not used there, but prevents 
> using it in thrift-based code.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (THRIFT-4323) range check errors or NPE in edge cases

2017-09-08 Thread Jens Geyer (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer resolved THRIFT-4323.

   Resolution: Fixed
Fix Version/s: 0.11.0

> range check errors or NPE in edge cases
> ---
>
> Key: THRIFT-4323
> URL: https://issues.apache.org/jira/browse/THRIFT-4323
> Project: Thrift
>  Issue Type: Bug
>  Components: Delphi - Library
>Reporter: Jens Geyer
>Assignee: Jens Geyer
> Fix For: 0.11.0
>
> Attachments: 
> 0001-THRIFT-4323-range-check-errors-or-NPE-in-edge-cases.patch
>
>
> Under certain conditions it may happen that a buffer element at index 0 is 
> passed to another function. The resulting pointer is never used (so this is 
> not security relevant), but the Delphi runtime may throw an error 
> nevertheless while trying to obtain the pointer to the non-existing element 
> at index 0 to be passed as argument.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (THRIFT-4324) field names can conflict with local vars in generated code

2017-09-08 Thread Jens Geyer (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer resolved THRIFT-4324.

   Resolution: Fixed
Fix Version/s: 0.11.0

> field names can conflict with local vars in generated code
> --
>
> Key: THRIFT-4324
> URL: https://issues.apache.org/jira/browse/THRIFT-4324
> Project: Thrift
>  Issue Type: Bug
>  Components: Delphi - Compiler
>Reporter: Jens Geyer
>Assignee: Jens Geyer
> Fix For: 0.11.0
>
> Attachments: 
> 0002-THRIFT-4324-field-names-can-conflict-with-local-vars.patch
>
>
> It is possible for the user to use names that may conflict with variables 
> used by the generated code, either causing unexpected behaviour or even 
> uncompileable code as a result.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (THRIFT-4324) field names can conflict with local vars in generated code

2017-09-08 Thread Jens Geyer (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer updated THRIFT-4324:
---
Attachment: 0002-THRIFT-4324-field-names-can-conflict-with-local-vars.patch

> field names can conflict with local vars in generated code
> --
>
> Key: THRIFT-4324
> URL: https://issues.apache.org/jira/browse/THRIFT-4324
> Project: Thrift
>  Issue Type: Bug
>  Components: Delphi - Compiler
>Reporter: Jens Geyer
>Assignee: Jens Geyer
> Attachments: 
> 0002-THRIFT-4324-field-names-can-conflict-with-local-vars.patch
>
>
> It is possible for the user to use names that may conflict with variables 
> used by the generated code, either causing unexpected behaviour or even 
> uncompileable code as a result.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (THRIFT-4323) range check errors or NPE in edge cases

2017-09-08 Thread Jens Geyer (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer updated THRIFT-4323:
---
Attachment: 0001-THRIFT-4323-range-check-errors-or-NPE-in-edge-cases.patch

> range check errors or NPE in edge cases
> ---
>
> Key: THRIFT-4323
> URL: https://issues.apache.org/jira/browse/THRIFT-4323
> Project: Thrift
>  Issue Type: Bug
>  Components: Delphi - Library
>Reporter: Jens Geyer
>Assignee: Jens Geyer
> Attachments: 
> 0001-THRIFT-4323-range-check-errors-or-NPE-in-edge-cases.patch
>
>
> Under certain conditions it may happen that a buffer element at index 0 is 
> passed to another function. The resulting pointer is never used (so this is 
> not security relevant), but the Delphi runtime may throw an error 
> nevertheless while trying to obtain the pointer to the non-existing element 
> at index 0 to be passed as argument.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (THRIFT-4324) field names can conflict with local vars in generated code

2017-09-08 Thread Jens Geyer (JIRA)
Jens Geyer created THRIFT-4324:
--

 Summary: field names can conflict with local vars in generated code
 Key: THRIFT-4324
 URL: https://issues.apache.org/jira/browse/THRIFT-4324
 Project: Thrift
  Issue Type: Bug
  Components: Delphi - Compiler
Reporter: Jens Geyer
Assignee: Jens Geyer


It is possible for the user to use names that may conflict with variables used 
by the generated code, either causing unexpected behaviour or even 
uncompileable code as a result.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (THRIFT-4323) range check errors or NPE in edge cases

2017-09-08 Thread Jens Geyer (JIRA)
Jens Geyer created THRIFT-4323:
--

 Summary: range check errors or NPE in edge cases
 Key: THRIFT-4323
 URL: https://issues.apache.org/jira/browse/THRIFT-4323
 Project: Thrift
  Issue Type: Bug
  Components: Delphi - Library
Reporter: Jens Geyer
Assignee: Jens Geyer


Under certain conditions it may happen that a buffer element at index 0 is 
passed to another function. The resulting pointer is never used (so this is not 
security relevant), but the Delphi runtime may throw an error nevertheless 
while trying to obtain the pointer to the non-existing element at index 0 to be 
passed as argument.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (THRIFT-4322) CLONE - Add custom HTTP header support to THttpClient / THttpTransport

2017-09-08 Thread Manav Raghuwanshi (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Manav Raghuwanshi updated THRIFT-4322:
--
Affects Version/s: 0.11.0

> CLONE - Add custom HTTP header support to THttpClient / THttpTransport
> --
>
> Key: THRIFT-4322
> URL: https://issues.apache.org/jira/browse/THRIFT-4322
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Library
>Affects Versions: 0.9.2, 0.9.3, 0.10.0, 0.11.0
>Reporter: Manav Raghuwanshi
>
> I'm trying to call from C++ into a HTTP Thrift server (using Java TServlet) 
> where the servlet is secured with HTTP basic auth. The C++ THttpClient 
> doesn't appear to support the Authentication header, or the ability to add 
> custom headers. The headers it sends in the request are hard coded in 
> THttpClient::flush(), with no ability to add custom defined headers.
> Other languages already support this, including Java, JavaScript, Go Lang (at 
> least from JavaDocs and other logged JIRA issues this appears to be the case).
> Could we get the feature added in the C++ library?
> I cloned this because the old issue had not been updated for a long time and 
> it didn't seem like it would anytime soon.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (THRIFT-4322) CLONE - Add custom HTTP header support to THttpClient / THttpTransport

2017-09-08 Thread Manav Raghuwanshi (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Manav Raghuwanshi updated THRIFT-4322:
--
Affects Version/s: 0.9.3
   0.10.0

> CLONE - Add custom HTTP header support to THttpClient / THttpTransport
> --
>
> Key: THRIFT-4322
> URL: https://issues.apache.org/jira/browse/THRIFT-4322
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Library
>Affects Versions: 0.9.2, 0.9.3, 0.10.0
>Reporter: Manav Raghuwanshi
>
> I'm trying to call from C++ into a HTTP Thrift server (using Java TServlet) 
> where the servlet is secured with HTTP basic auth. The C++ THttpClient 
> doesn't appear to support the Authentication header, or the ability to add 
> custom headers. The headers it sends in the request are hard coded in 
> THttpClient::flush(), with no ability to add custom defined headers.
> Other languages already support this, including Java, JavaScript, Go Lang (at 
> least from JavaDocs and other logged JIRA issues this appears to be the case).
> Could we get the feature added in the C++ library?
> I cloned this because the old issue had not been updated for a long time and 
> it didn't seem like it would anytime soon.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (THRIFT-4322) CLONE - Add custom HTTP header support to THttpClient / THttpTransport

2017-09-08 Thread Manav Raghuwanshi (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Manav Raghuwanshi updated THRIFT-4322:
--
Description: 
I'm trying to call from C++ into a HTTP Thrift server (using Java TServlet) 
where the servlet is secured with HTTP basic auth. The C++ THttpClient doesn't 
appear to support the Authentication header, or the ability to add custom 
headers. The headers it sends in the request are hard coded in 
THttpClient::flush(), with no ability to add custom defined headers.

Other languages already support this, including Java, JavaScript, Go Lang (at 
least from JavaDocs and other logged JIRA issues this appears to be the case).

Could we get the feature added in the C++ library?

I cloned this because the old issue had not been updated for a long time and it 
didn't seem like it would anytime soon.

  was:
I'm trying to call from C++ into a HTTP Thrift server (using Java TServlet) 
where the servlet is secured with HTTP basic auth. The C++ THttpClient doesn't 
appear to support the Authentication header, or the ability to add custom 
headers. The headers it sends in the request are hard coded in 
THttpClient::flush(), with no ability to add custom defined headers.

Other languages already support this, including Java, JavaScript, Go Lang (at 
least from JavaDocs and other logged JIRA issues this appears to be the case).

Could we get the feature added in the C++ library?


> CLONE - Add custom HTTP header support to THttpClient / THttpTransport
> --
>
> Key: THRIFT-4322
> URL: https://issues.apache.org/jira/browse/THRIFT-4322
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Library
>Affects Versions: 0.9.2, 0.9.3, 0.10.0
>Reporter: Manav Raghuwanshi
>
> I'm trying to call from C++ into a HTTP Thrift server (using Java TServlet) 
> where the servlet is secured with HTTP basic auth. The C++ THttpClient 
> doesn't appear to support the Authentication header, or the ability to add 
> custom headers. The headers it sends in the request are hard coded in 
> THttpClient::flush(), with no ability to add custom defined headers.
> Other languages already support this, including Java, JavaScript, Go Lang (at 
> least from JavaDocs and other logged JIRA issues this appears to be the case).
> Could we get the feature added in the C++ library?
> I cloned this because the old issue had not been updated for a long time and 
> it didn't seem like it would anytime soon.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (THRIFT-4322) CLONE - Add custom HTTP header support to THttpClient / THttpTransport

2017-09-08 Thread Manav Raghuwanshi (JIRA)
Manav Raghuwanshi created THRIFT-4322:
-

 Summary: CLONE - Add custom HTTP header support to THttpClient / 
THttpTransport
 Key: THRIFT-4322
 URL: https://issues.apache.org/jira/browse/THRIFT-4322
 Project: Thrift
  Issue Type: Improvement
  Components: C++ - Library
Affects Versions: 0.9.2
Reporter: Manav Raghuwanshi


I'm trying to call from C++ into a HTTP Thrift server (using Java TServlet) 
where the servlet is secured with HTTP basic auth. The C++ THttpClient doesn't 
appear to support the Authentication header, or the ability to add custom 
headers. The headers it sends in the request are hard coded in 
THttpClient::flush(), with no ability to add custom defined headers.

Other languages already support this, including Java, JavaScript, Go Lang (at 
least from JavaDocs and other logged JIRA issues this appears to be the case).

Could we get the feature added in the C++ library?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-3054) Add custom HTTP header support to THttpClient / THttpTransport

2017-09-08 Thread Manav Raghuwanshi (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16159087#comment-16159087
 ] 

Manav Raghuwanshi commented on THRIFT-3054:
---

Any updates on this issue? I want to send custom headers to the server but C++ 
thrift doesn't have that functionality.

> Add custom HTTP header support to THttpClient / THttpTransport
> --
>
> Key: THRIFT-3054
> URL: https://issues.apache.org/jira/browse/THRIFT-3054
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Library
>Affects Versions: 0.9.2
>Reporter: Tim Stavenger
>
> I'm trying to call from C++ into a HTTP Thrift server (using Java TServlet) 
> where the servlet is secured with HTTP basic auth. The C++ THttpClient 
> doesn't appear to support the Authentication header, or the ability to add 
> custom headers. The headers it sends in the request are hard coded in 
> THttpClient::flush(), with no ability to add custom defined headers.
> Other languages already support this, including Java, JavaScript, Go Lang (at 
> least from JavaDocs and other logged JIRA issues this appears to be the case).
> Could we get the feature added in the C++ library?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4292) TimerManager::remove() is not implemented

2017-09-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16158749#comment-16158749
 ] 

ASF GitHub Bot commented on THRIFT-4292:


Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1337#discussion_r137811890
  
--- Diff: lib/cpp/src/thrift/concurrency/TimerManager.cpp ---
@@ -290,11 +292,23 @@ void TimerManager::add(shared_ptr task, 
const struct timeval& value) {
 }
 
 void TimerManager::remove(shared_ptr task) {
-  (void)task;
   Synchronized s(monitor_);
   if (state_ != TimerManager::STARTED) {
 throw IllegalStateException();
   }
+  std::vector toRemove;
--- End diff --

done


> TimerManager::remove() is not implemented
> -
>
> Key: THRIFT-4292
> URL: https://issues.apache.org/jira/browse/THRIFT-4292
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Reporter: Francois Ferrand
>
> The function is currently not implemented.
> This is not critical for Thrift, since it is not used there, but prevents 
> using it in thrift-based code.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1337: THRIFT-4292: Implement TimerManager::remove()

2017-09-08 Thread Typz
Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1337#discussion_r137811890
  
--- Diff: lib/cpp/src/thrift/concurrency/TimerManager.cpp ---
@@ -290,11 +292,23 @@ void TimerManager::add(shared_ptr task, 
const struct timeval& value) {
 }
 
 void TimerManager::remove(shared_ptr task) {
-  (void)task;
   Synchronized s(monitor_);
   if (state_ != TimerManager::STARTED) {
 throw IllegalStateException();
   }
+  std::vector toRemove;
--- End diff --

done


---


[jira] [Commented] (THRIFT-4292) TimerManager::remove() is not implemented

2017-09-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16158735#comment-16158735
 ] 

ASF GitHub Bot commented on THRIFT-4292:


Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1337#discussion_r137810110
  
--- Diff: lib/cpp/test/concurrency/TimerManagerTests.h ---
@@ -126,6 +126,38 @@ class TimerManagerTests {
 return true;
   }
 
+  /**
+   * This test creates two tasks, removes the first one then waits for the 
second one. It then
+   * verifies that the timer manager properly clean up itself and the 
remaining orphaned timeout
+   * task when the manager goes out of scope and its destructor is called.
+   */
+  bool test01(int64_t timeout = 1000LL) {
+TimerManager timerManager;
+timerManager.threadFactory(shared_ptr(new 
PlatformThreadFactory()));
+timerManager.start();
+assert(timerManager.state() == TimerManager::STARTED);
+
+Synchronized s(_monitor);
+
+// Setup the two tasks
+shared_ptr taskToRemove
+  = shared_ptr(new 
TimerManagerTests::Task(_monitor, timeout / 2));
+timerManager.add(taskToRemove, taskToRemove->_timeout);
+
+shared_ptr task
+  = shared_ptr(new 
TimerManagerTests::Task(_monitor, timeout));
+timerManager.add(task, task->_timeout);
+
+// Remove one task and wait until the other has completed
+timerManager.remove(taskToRemove);
+_monitor.wait(timeout * 2);
+
+assert(!taskToRemove->_done);
+assert(task->_done);
+
+return true;
+  }
+
--- End diff --

done


> TimerManager::remove() is not implemented
> -
>
> Key: THRIFT-4292
> URL: https://issues.apache.org/jira/browse/THRIFT-4292
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Reporter: Francois Ferrand
>
> The function is currently not implemented.
> This is not critical for Thrift, since it is not used there, but prevents 
> using it in thrift-based code.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1337: THRIFT-4292: Implement TimerManager::remove()

2017-09-08 Thread Typz
Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1337#discussion_r137810110
  
--- Diff: lib/cpp/test/concurrency/TimerManagerTests.h ---
@@ -126,6 +126,38 @@ class TimerManagerTests {
 return true;
   }
 
+  /**
+   * This test creates two tasks, removes the first one then waits for the 
second one. It then
+   * verifies that the timer manager properly clean up itself and the 
remaining orphaned timeout
+   * task when the manager goes out of scope and its destructor is called.
+   */
+  bool test01(int64_t timeout = 1000LL) {
+TimerManager timerManager;
+timerManager.threadFactory(shared_ptr(new 
PlatformThreadFactory()));
+timerManager.start();
+assert(timerManager.state() == TimerManager::STARTED);
+
+Synchronized s(_monitor);
+
+// Setup the two tasks
+shared_ptr taskToRemove
+  = shared_ptr(new 
TimerManagerTests::Task(_monitor, timeout / 2));
+timerManager.add(taskToRemove, taskToRemove->_timeout);
+
+shared_ptr task
+  = shared_ptr(new 
TimerManagerTests::Task(_monitor, timeout));
+timerManager.add(task, task->_timeout);
+
+// Remove one task and wait until the other has completed
+timerManager.remove(taskToRemove);
+_monitor.wait(timeout * 2);
+
+assert(!taskToRemove->_done);
+assert(task->_done);
+
+return true;
+  }
+
--- End diff --

done


---


[jira] [Commented] (THRIFT-4292) TimerManager::remove() is not implemented

2017-09-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16158730#comment-16158730
 ] 

ASF GitHub Bot commented on THRIFT-4292:


Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1337#discussion_r137809132
  
--- Diff: lib/cpp/src/thrift/concurrency/TimerManager.cpp ---
@@ -52,6 +52,8 @@ class TimerManager::Task : public Runnable {
 }
   }
 
+  shared_ptr runnable() const { return runnable_; }
--- End diff --

done


> TimerManager::remove() is not implemented
> -
>
> Key: THRIFT-4292
> URL: https://issues.apache.org/jira/browse/THRIFT-4292
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Reporter: Francois Ferrand
>
> The function is currently not implemented.
> This is not critical for Thrift, since it is not used there, but prevents 
> using it in thrift-based code.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1337: THRIFT-4292: Implement TimerManager::remove()

2017-09-08 Thread Typz
Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1337#discussion_r137809132
  
--- Diff: lib/cpp/src/thrift/concurrency/TimerManager.cpp ---
@@ -52,6 +52,8 @@ class TimerManager::Task : public Runnable {
 }
   }
 
+  shared_ptr runnable() const { return runnable_; }
--- End diff --

done


---


[jira] [Commented] (THRIFT-4292) TimerManager::remove() is not implemented

2017-09-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16158722#comment-16158722
 ] 

ASF GitHub Bot commented on THRIFT-4292:


Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1337#discussion_r137808236
  
--- Diff: lib/cpp/src/thrift/concurrency/TimerManager.cpp ---
@@ -290,11 +292,23 @@ void TimerManager::add(shared_ptr task, 
const struct timeval& value) {
 }
 
 void TimerManager::remove(shared_ptr task) {
-  (void)task;
   Synchronized s(monitor_);
   if (state_ != TimerManager::STARTED) {
 throw IllegalStateException();
   }
+  std::vector toRemove;
+  for (task_iterator ix = taskMap_.begin(); ix != taskMap_.end(); ++ix) {
+if (ix->second->runnable() == task) {
+  toRemove.push_back(ix);
+}
+  }
+  if (toRemove.empty()) {
+throw NoSuchTaskException();
+  }
+  for (std::vector::iterator ix = toRemove.begin(); ix != 
toRemove.end(); ++ix) {
+taskMap_.erase(*ix);
--- End diff --

Tasks cannot exist multiple times, only newly allocated tasks are inserted:
```cpp
  taskMap_.insert(
std::pair(timeout, shared_ptr(new 
Task(task;
```

Which is why I implemented it in the same fashion as the run() method. But 
i can change it.


> TimerManager::remove() is not implemented
> -
>
> Key: THRIFT-4292
> URL: https://issues.apache.org/jira/browse/THRIFT-4292
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Reporter: Francois Ferrand
>
> The function is currently not implemented.
> This is not critical for Thrift, since it is not used there, but prevents 
> using it in thrift-based code.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1337: THRIFT-4292: Implement TimerManager::remove()

2017-09-08 Thread Typz
Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1337#discussion_r137808236
  
--- Diff: lib/cpp/src/thrift/concurrency/TimerManager.cpp ---
@@ -290,11 +292,23 @@ void TimerManager::add(shared_ptr task, 
const struct timeval& value) {
 }
 
 void TimerManager::remove(shared_ptr task) {
-  (void)task;
   Synchronized s(monitor_);
   if (state_ != TimerManager::STARTED) {
 throw IllegalStateException();
   }
+  std::vector toRemove;
+  for (task_iterator ix = taskMap_.begin(); ix != taskMap_.end(); ++ix) {
+if (ix->second->runnable() == task) {
+  toRemove.push_back(ix);
+}
+  }
+  if (toRemove.empty()) {
+throw NoSuchTaskException();
+  }
+  for (std::vector::iterator ix = toRemove.begin(); ix != 
toRemove.end(); ++ix) {
+taskMap_.erase(*ix);
--- End diff --

Tasks cannot exist multiple times, only newly allocated tasks are inserted:
```cpp
  taskMap_.insert(
std::pair(timeout, shared_ptr(new 
Task(task;
```

Which is why I implemented it in the same fashion as the run() method. But 
i can change it.


---


[jira] [Created] (THRIFT-4321) Migrate to new project format and enable CI

2017-09-08 Thread Ivan (JIRA)
Ivan created THRIFT-4321:


 Summary: Migrate to new project format and enable CI
 Key: THRIFT-4321
 URL: https://issues.apache.org/jira/browse/THRIFT-4321
 Project: Thrift
  Issue Type: Improvement
  Components: .NETCore - Library
Reporter: Ivan


Current library is still using old project structure (project.json) which is 
slightly outdated and needs to be migrated to new MSBuild format.

In addition to that, I'd like to have separate packages build for different 
.NET Standard versions starting from 1.4 (UWP) and up to 2.0 with full feature 
set.




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-2289) Erlang impl of Thrift JSON protocol wrongly writes/expects true/false for bools

2017-09-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-2289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16158356#comment-16158356
 ] 

ASF GitHub Bot commented on THRIFT-2289:


Github user walter-weinmann commented on the issue:

https://github.com/apache/thrift/pull/1349
  
Unfortunately the first step in Travis breaks always with:

`The job exceeded the maximum time limit for jobs, and has been terminated.`


> Erlang impl of Thrift JSON protocol wrongly writes/expects true/false for 
> bools
> ---
>
> Key: THRIFT-2289
> URL: https://issues.apache.org/jira/browse/THRIFT-2289
> Project: Thrift
>  Issue Type: Bug
>  Components: Erlang - Library
>Affects Versions: 0.9.1
>Reporter: Jens Geyer
>
> Some implementations of Thrift JSON protocol wrongly write and expect 
> true/false for bools, instead of 0/1



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift issue #1349: THRIFT-2289: Erlang impl of Thrift JSON protocol wrongly...

2017-09-08 Thread walter-weinmann
Github user walter-weinmann commented on the issue:

https://github.com/apache/thrift/pull/1349
  
Unfortunately the first step in Travis breaks always with:

`The job exceeded the maximum time limit for jobs, and has been terminated.`


---


[jira] [Assigned] (THRIFT-4320) Use interface instead of strict http.Client type in THttpClientOptions

2017-09-08 Thread Can Celasun (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Can Celasun reassigned THRIFT-4320:
---

Assignee: Can Celasun

> Use interface instead of strict http.Client type in THttpClientOptions
> --
>
> Key: THRIFT-4320
> URL: https://issues.apache.org/jira/browse/THRIFT-4320
> Project: Thrift
>  Issue Type: Improvement
>  Components: Go - Library
>Reporter: Marek Brysa
>Assignee: Can Celasun
>Priority: Minor
>
> {{THttpClientOptions}} (http_client.go) takes a strict {{http.Client}} type 
> which disallows developers from customizing http.Client or providing their 
> own implementation. I propose to replace this with an interface such as:
> {code}
> type HttpClient interface {
>   Do(req *http.Request) (*http.Response, error)
> }
> {code}
> {{Do()}} is the only function of http.Client that is used (in 
> {{THttpClient.Flush()}}).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4320) Use interface instead of strict http.Client type in THttpClientOptions

2017-09-08 Thread Can Celasun (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16158299#comment-16158299
 ] 

Can Celasun commented on THRIFT-4320:
-

Makes sense. I'll do it over the weekend.

> Use interface instead of strict http.Client type in THttpClientOptions
> --
>
> Key: THRIFT-4320
> URL: https://issues.apache.org/jira/browse/THRIFT-4320
> Project: Thrift
>  Issue Type: Improvement
>  Components: Go - Library
>Reporter: Marek Brysa
>Priority: Minor
>
> {{THttpClientOptions}} (http_client.go) takes a strict {{http.Client}} type 
> which disallows developers from customizing http.Client or providing their 
> own implementation. I propose to replace this with an interface such as:
> {code}
> type HttpClient interface {
>   Do(req *http.Request) (*http.Response, error)
> }
> {code}
> {{Do()}} is the only function of http.Client that is used (in 
> {{THttpClient.Flush()}}).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-2289) Erlang impl of Thrift JSON protocol wrongly writes/expects true/false for bools

2017-09-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-2289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16158290#comment-16158290
 ] 

ASF GitHub Bot commented on THRIFT-2289:


Github user walter-weinmann commented on the issue:

https://github.com/apache/thrift/pull/1349
  
This closes #1349


> Erlang impl of Thrift JSON protocol wrongly writes/expects true/false for 
> bools
> ---
>
> Key: THRIFT-2289
> URL: https://issues.apache.org/jira/browse/THRIFT-2289
> Project: Thrift
>  Issue Type: Bug
>  Components: Erlang - Library
>Affects Versions: 0.9.1
>Reporter: Jens Geyer
>
> Some implementations of Thrift JSON protocol wrongly write and expect 
> true/false for bools, instead of 0/1



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift issue #1349: THRIFT-2289: Erlang impl of Thrift JSON protocol wrongly...

2017-09-08 Thread walter-weinmann
Github user walter-weinmann commented on the issue:

https://github.com/apache/thrift/pull/1349
  
This closes #1349


---


[jira] [Commented] (THRIFT-2289) Erlang impl of Thrift JSON protocol wrongly writes/expects true/false for bools

2017-09-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-2289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16158274#comment-16158274
 ] 

ASF GitHub Bot commented on THRIFT-2289:


GitHub user walter-weinmann opened a pull request:

https://github.com/apache/thrift/pull/1349

THRIFT-2289: Erlang impl of Thrift JSON protocol wrongly writes/expec…

…ts true/false for bools

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/walter-weinmann/thrift THRIFT-2289

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1349.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1349


commit 09a5ccec4e4640a07035b42ae747a5f408429560
Author: walter-weinmann 
Date:   2017-09-07T19:25:49Z

THRIFT-2289: Erlang impl of Thrift JSON protocol wrongly writes/expects 
true/false for bools




> Erlang impl of Thrift JSON protocol wrongly writes/expects true/false for 
> bools
> ---
>
> Key: THRIFT-2289
> URL: https://issues.apache.org/jira/browse/THRIFT-2289
> Project: Thrift
>  Issue Type: Bug
>  Components: Erlang - Library
>Affects Versions: 0.9.1
>Reporter: Jens Geyer
>
> Some implementations of Thrift JSON protocol wrongly write and expect 
> true/false for bools, instead of 0/1



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1349: THRIFT-2289: Erlang impl of Thrift JSON protocol ...

2017-09-08 Thread walter-weinmann
GitHub user walter-weinmann opened a pull request:

https://github.com/apache/thrift/pull/1349

THRIFT-2289: Erlang impl of Thrift JSON protocol wrongly writes/expec…

…ts true/false for bools

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/walter-weinmann/thrift THRIFT-2289

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1349.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1349


commit 09a5ccec4e4640a07035b42ae747a5f408429560
Author: walter-weinmann 
Date:   2017-09-07T19:25:49Z

THRIFT-2289: Erlang impl of Thrift JSON protocol wrongly writes/expects 
true/false for bools




---


[jira] [Resolved] (THRIFT-4311) lib/erl eunit tests not running

2017-09-08 Thread Walter Weinmann (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-4311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Walter Weinmann resolved THRIFT-4311.
-
Resolution: Not A Bug

This is a windows specific problem since automake / make cannot be applied.

*Workaround*: Compile the thrift files manually before starting the eunit tests.

> lib/erl eunit tests not running
> ---
>
> Key: THRIFT-4311
> URL: https://issues.apache.org/jira/browse/THRIFT-4311
> Project: Thrift
>  Issue Type: Bug
>  Components: Erlang - Library
>Affects Versions: 0.10.0
> Environment: Windows 10
> Erlang OTP 20
> rebar3
>Reporter: Walter Weinmann
>Priority: Minor
>  Labels: erlang, eunit, lib
>
> Running the eunit tests gives the following results:
> {quote}D:\SoftDevelopment\Projects\erlang_thrift_idea\erlang_thrift>rebar3
>  eunit
> ===> Verifying dependencies...
> ===> Compiling thrift
> src/thrift_socket_server.erl:27: Warning: export_all flag enabled - all 
> functions will be exported
> src/thrift_json_protocol.erl:59: Warning: this clause cannot match because a 
> previous clause at line 57 always matches
> ===> Compiling _build/test/lib/thrift/test/thrift_test_test.erl failed
> _build/test/lib/thrift/test/thrift_test_test.erl:26: can't find include file 
> "gen-erl/thrift_test_constants.hrl"
> _build/test/lib/thrift/test/thrift_test_test.erl:30: undefined macro 
> 'THRIFT_TEST_MYNUMBERZ'
> _build/test/lib/thrift/test/thrift_test_test.erl:37: record 
> 'thrift.test.Bonk' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:41: record 
> 'thrift.test.Bools' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:45: record 
> 'thrift.test.Xtruct' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:49: record 
> 'thrift.test.Xtruct2' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:53: record 
> 'thrift.test.Xtruct3' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:57: record 
> 'thrift.test.Insanity' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:61: record 
> 'thrift.test.CrazyNesting' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:70: record 
> 'thrift.test.Xception' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:74: record 
> 'thrift.test.Xception2' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:76: record 
> 'thrift.test.EmptyStruct' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:77: record 
> 'thrift.test.OneField' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:80: record 
> 'thrift.test.VersioningTestV1' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:84: record 
> 'thrift.test.VersioningTestV2' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:101: record 
> 'thrift.test.ListTypeVersioningV1' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:105: record 
> 'thrift.test.ListTypeVersioningV2' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:109: record 
> 'thrift.test.GuessProtocolStruct' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:113: record 
> 'thrift.test.LargeDeltas' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:128: record 
> 'thrift.test.NestedListsI32x2' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:132: record 
> 'thrift.test.NestedListsI32x3' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:136: record 
> 'thrift.test.NestedMixedx2' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:142: record 
> 'thrift.test.ListBonks' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:145: record 
> 'thrift.test.NestedListsBonk' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:149: record 
> 'thrift.test.BoolTest' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:151: record 
> 'thrift.test.StructA' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:154: record 
> 'thrift.test.StructB' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:190: record 
> 'thrift.test.Xtruct' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:233: record 
> 'thrift.test.Xtruct' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:243: record 
> 'thrift.test.EmptyStruct' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:263: record 
> 'thrift.test.Bonk' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:294: record 
> 'thrift.test.Bools' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:295: record 
> 'thrift.test.Bools' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:296: record 
> 'thrift.test.Bools' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:298: record 
> 'thrift.test.Bools' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:300: record 
> 'thrift.test.VersioningTestV2' 

[jira] [Commented] (THRIFT-4311) lib/erl eunit tests not running

2017-09-08 Thread Walter Weinmann (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16158253#comment-16158253
 ] 

Walter Weinmann commented on THRIFT-4311:
-

This is a Windows specific problem: before starting the eunit tests you must 
first compile the thrift files manually - the make command cannot be applied in 
Windows.  

> lib/erl eunit tests not running
> ---
>
> Key: THRIFT-4311
> URL: https://issues.apache.org/jira/browse/THRIFT-4311
> Project: Thrift
>  Issue Type: Bug
>  Components: Erlang - Library
>Affects Versions: 0.10.0
> Environment: Windows 10
> Erlang OTP 20
> rebar3
>Reporter: Walter Weinmann
>Priority: Minor
>  Labels: erlang, eunit, lib
>
> Running the eunit tests gives the following results:
> {quote}D:\SoftDevelopment\Projects\erlang_thrift_idea\erlang_thrift>rebar3
>  eunit
> ===> Verifying dependencies...
> ===> Compiling thrift
> src/thrift_socket_server.erl:27: Warning: export_all flag enabled - all 
> functions will be exported
> src/thrift_json_protocol.erl:59: Warning: this clause cannot match because a 
> previous clause at line 57 always matches
> ===> Compiling _build/test/lib/thrift/test/thrift_test_test.erl failed
> _build/test/lib/thrift/test/thrift_test_test.erl:26: can't find include file 
> "gen-erl/thrift_test_constants.hrl"
> _build/test/lib/thrift/test/thrift_test_test.erl:30: undefined macro 
> 'THRIFT_TEST_MYNUMBERZ'
> _build/test/lib/thrift/test/thrift_test_test.erl:37: record 
> 'thrift.test.Bonk' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:41: record 
> 'thrift.test.Bools' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:45: record 
> 'thrift.test.Xtruct' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:49: record 
> 'thrift.test.Xtruct2' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:53: record 
> 'thrift.test.Xtruct3' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:57: record 
> 'thrift.test.Insanity' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:61: record 
> 'thrift.test.CrazyNesting' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:70: record 
> 'thrift.test.Xception' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:74: record 
> 'thrift.test.Xception2' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:76: record 
> 'thrift.test.EmptyStruct' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:77: record 
> 'thrift.test.OneField' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:80: record 
> 'thrift.test.VersioningTestV1' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:84: record 
> 'thrift.test.VersioningTestV2' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:101: record 
> 'thrift.test.ListTypeVersioningV1' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:105: record 
> 'thrift.test.ListTypeVersioningV2' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:109: record 
> 'thrift.test.GuessProtocolStruct' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:113: record 
> 'thrift.test.LargeDeltas' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:128: record 
> 'thrift.test.NestedListsI32x2' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:132: record 
> 'thrift.test.NestedListsI32x3' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:136: record 
> 'thrift.test.NestedMixedx2' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:142: record 
> 'thrift.test.ListBonks' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:145: record 
> 'thrift.test.NestedListsBonk' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:149: record 
> 'thrift.test.BoolTest' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:151: record 
> 'thrift.test.StructA' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:154: record 
> 'thrift.test.StructB' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:190: record 
> 'thrift.test.Xtruct' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:233: record 
> 'thrift.test.Xtruct' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:243: record 
> 'thrift.test.EmptyStruct' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:263: record 
> 'thrift.test.Bonk' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:294: record 
> 'thrift.test.Bools' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:295: record 
> 'thrift.test.Bools' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:296: record 
> 'thrift.test.Bools' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:298: record 
> 'thrift.test.Bools' undefined
> _build/test/lib/thrift/test/thrift_test_test.erl:300: record 
> 

[jira] [Created] (THRIFT-4320) Use interface instead of strict http.Client type in THttpClientOptions

2017-09-08 Thread Marek Brysa (JIRA)
Marek Brysa created THRIFT-4320:
---

 Summary: Use interface instead of strict http.Client type in 
THttpClientOptions
 Key: THRIFT-4320
 URL: https://issues.apache.org/jira/browse/THRIFT-4320
 Project: Thrift
  Issue Type: Improvement
  Components: Go - Library
Reporter: Marek Brysa
Priority: Minor


{{THttpClientOptions}} (http_client.go) takes a strict {{http.Client}} type 
which disallows developers from customizing http.Client or providing their own 
implementation. I propose to replace this with an interface such as:
{code}
type HttpClient interface {
Do(req *http.Request) (*http.Response, error)
}
{code}
{{Do()}} is the only function of http.Client that is used (in 
{{THttpClient.Flush()}}).




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)