Merge branch 'stable-2.15'

* stable-2.15:
  Add missing documentation of 'all' option on list projects REST API
  RefAdvertisementIT: Test hiding meta refs
  Evict database idle connections

Change-Id: Id4a8f55403324773483880704f62d0c83e64f807
This commit is contained in:
David Pursehouse
2017-11-16 08:17:31 +09:00
2 changed files with 30 additions and 0 deletions

View File

@@ -324,6 +324,33 @@ GET /projects/?type=PERMISSIONS HTTP/1.0
}
----
All::
Get all projects, including those whose state is "HIDDEN".
+
.Request
----
GET /projects/?all HTTP/1.0
----
+
.Response
----
HTTP/1.1 200 OK
Content-Disposition: attachment
Content-Type: application/json; charset=UTF-8
)]}'
{
"All-Projects" {
"id": "All-Projects",
"state": "ACTIVE"
},
"some-other-project": {
"id": "some-other-project",
"state": "HIDDEN"
}
}
----
[[query-projects]]
=== Query Projects
--

View File

@@ -138,6 +138,9 @@ public class DataSourceProvider implements Provider<DataSource>, LifecycleListen
MILLISECONDS.convert(30, SECONDS),
MILLISECONDS));
ds.setInitialSize(ds.getMinIdle());
long evictIdleTimeMs = 1000L * 60;
ds.setMinEvictableIdleTimeMillis(evictIdleTimeMs);
ds.setTimeBetweenEvictionRunsMillis(evictIdleTimeMs / 2);
ds.setValidationQuery(dst.getValidationQuery());
ds.setValidationQueryTimeout(5);
exportPoolMetrics(ds);