serverVersion = versions.getMarkLogicVersion(); serverVersionOk = isServerVersionValid(serverVersion); HashMap response = new HashMap(); response.put("safeToInstall", isSafeToInstall()); if ((boolean) response.get("safeToInstall")) { response.put("dhfVersion", versions.getHubVersion());
@JsonIgnore public void refreshProject(Properties properties, boolean loadGradleProperties) { loadConfigurationFromProperties(properties, loadGradleProperties); flowManager.setupClient(); dataHub.wireClient(); versions.setupClient(); }
/** * This is still needed by the Gradle tasks. * * @param hubConfig */ public DeployHubAmpsCommand(HubConfig hubConfig) { this.hubConfig = hubConfig; this.versions = new Versions(hubConfig); }
@Override public boolean upgradeHub(List<String> updatedFlows) throws CantUpgradeException { boolean isHubInstalled = this.isInstalled().isInstalled(); String currentVersion = versions.getHubVersion(); int compare = Versions.compare(currentVersion, MIN_UPGRADE_VERSION); if (compare == -1) { throw new CantUpgradeException(currentVersion, MIN_UPGRADE_VERSION); String gradleVersion = versions.getDHFVersion(); File buildGradle = Paths.get(project.getProjectDirString(), "build.gradle").toFile();
try { if (versionString == null) { versionString = versions.getMarkLogicVersion();
@Test public void ensureHubFourLoaded() { loadHubModulesCommand.execute(commandContext); String jarVersion = adminHubConfig.getJarVersion(); //logger.info(jarVersion); // this test will work until major version 10 assertTrue(jarVersion.charAt(0) >= '4'); assertEquals(jarVersion, versions.getHubVersion(), "Jar version must match version in config.xqy/config.sjs after installation"); }
public String getHubVersion() { try { ResourceServices.ServiceResultIterator resultItr = this.getServices().get(new RequestParameters()); if (resultItr == null || ! resultItr.hasNext()) { return null; } ResourceServices.ServiceResult res = resultItr.next(); return res.getContent(new StringHandle()).get(); } catch(Exception e) {} // 2.0.0 is the version at which we started using this method. It's the // default fallback and should not be changed. return "2.0.0"; }
protected int getMlMajorVersion() { return Integer.parseInt(versions.getMarkLogicVersion().substring(0, 1)); }
@Test public void getHubModulesVersion() throws IOException { String version = getHubFlowRunnerConfig().getJarVersion(); assertEquals(version, versions.getHubVersion()); getHubAdminConfig(); }
String serverVersion = versions.getMarkLogicVersion(); logger.info("Choosing amp uninstall based on server version " + serverVersion);
@Test public void getHubModulesVersion() throws IOException { String version = getHubFlowRunnerConfig().getJarVersion(); assertEquals(version, versions.getHubVersion()); getHubAdminConfig(); }
public void wireClients() { fm.setupClient(); dataHub.wireClient(); versions.setupClient(); } //Use this method sparingly as it slows down the test
String serverVersion = versions.getMarkLogicVersion();
@Test public void testPreFlightCheckNoHubInstalled() { List<Namespace> list = new ArrayList<>(); expect(serverManager.getAsXml()).andReturn(new ResourcesFragment(new Fragment("<server-default-list xmlns=\"http://marklogic.com/manage/servers\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://marklogic.com/manage/servers manage-servers.xsd\"> <meta> <uri>/manage/v2/servers</uri> <current-time>2017-10-01T19:15:38.140598-04:00</current-time> <elapsed-time units=\"sec\">0.030447</elapsed-time> </meta> <relations> <relation-group array=\"true\"> <typeref>groups</typeref> <relation-count units=\"quantity\">1</relation-count> <relation array=\"true\"> <uriref>/manage/v2/groups/Default</uriref> <idref>3341249095562999141</idref> <nameref>Default</nameref> </relation> </relation-group> </relations> <list-items> <list-count units=\"quantity\">8</list-count> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/Admin?group-id=Default</uriref> <kindref>http</kindref> <content-db>Security</content-db> <idref>7776582106827683360</idref> <nameref>Admin</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/App-Services?group-id=Default</uriref> <kindref>http</kindref> <content-db>Documents</content-db> <modules-db>Modules</modules-db> <idref>4626187627163603518</idref> <nameref>App-Services</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/HealthCheck?group-id=Default</uriref> <kindref>http</kindref> <content-db>App-Services</content-db> <idref>16530884482127520539</idref> <nameref>HealthCheck</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/Manage?group-id=Default</uriref> <kindref>http</kindref> <content-db>App-Services</content-db> <idref>15392081774558336614</idref> <nameref>Manage</nameref> </list-item> </list-items> <related-views> <related-view array=\"true\"> <view-type>root</view-type> <view-name>default</view-name> <view-uri>/manage/v2</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>metrics</view-name> <view-uri>/manage/v2/servers?view=metrics</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>package</view-name> <view-uri>/manage/v2/servers?view=package</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>schema</view-name> <view-uri>/manage/v2/servers?view=schema</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>status</view-name> <view-uri>/manage/v2/servers?view=status</view-uri> </related-view> </related-views> </server-default-list>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("Admin")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>Admin</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>Admin/</root> <authentication>digest</authentication> <port>8001</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>10800</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>false</debug-allow> <profile-allow>false</profile-allow> <default-xquery-version>0.9-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>/error-switch.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>rewriter.xqy</url-rewriter> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>Security</content-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("App-Services")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>App-Services</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>/</root> <authentication>digest</authentication> <port>8000</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>/MarkLogic/rest-api/8000-error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>/MarkLogic/rest-api/8000-rewriter.xml</url-rewriter> <rewrite-resolves-globally>true</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>Documents</content-database> <modules-database>Modules</modules-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("HealthCheck")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>HealthCheck</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>HealthCheck/</root> <authentication>application-level</authentication> <port>7997</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>2</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler/> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter/> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>App-Services</content-database> <default-user>healthcheck</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("Manage")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>Manage</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>Apps/</root> <authentication>digest</authentication> <port>8002</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>manage/error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>manage/rewriter.xqy</url-rewriter> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>App-Services</content-database> <default-user>nobody</default-user> <privilege>http://marklogic.com/xdmp/privileges/manage</privilege> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(versions.getMarkLogicVersion()).andReturn("9.0-6"); replay(dh, serverManager, versions); dh.runPreInstallCheck(); assertTrue(dh.isServerVersionOk()); assertFalse(dh.isPortInUse(DatabaseKind.STAGING)); assertFalse(dh.isPortInUse(DatabaseKind.FINAL)); assertFalse(dh.isPortInUse(DatabaseKind.JOB)); assertTrue(dh.isSafeToInstall()); }
@Test public void testPreFlightCheckHubAlreadyInstalled() { List<Namespace> list = new ArrayList<>(); expect(serverManager.getAsXml()).andReturn(new ResourcesFragment(new Fragment("<server-default-list xsi:schemaLocation=\"http://marklogic.com/manage/servers manage-servers.xsd\" xmlns=\"http://marklogic.com/manage/servers\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"> <meta> <uri>/manage/v2/servers</uri> <current-time>2017-10-01T19:15:38.140598-04:00</current-time> <elapsed-time units=\"sec\">0.030447</elapsed-time> </meta> <relations> <relation-group array=\"true\"> <typeref>groups</typeref> <relation-count units=\"quantity\">1</relation-count> <relation array=\"true\"> <uriref>/manage/v2/groups/Default</uriref> <idref>3341249095562999141</idref> <nameref>Default</nameref> </relation> </relation-group> </relations> <list-items> <list-count units=\"quantity\">8</list-count> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/Admin?group-id=Default</uriref> <kindref>http</kindref> <content-db>Security</content-db> <idref>7776582106827683360</idref> <nameref>Admin</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/App-Services?group-id=Default</uriref> <kindref>http</kindref> <content-db>Documents</content-db> <modules-db>Modules</modules-db> <idref>4626187627163603518</idref> <nameref>App-Services</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/data-hub-FINAL?group-id=Default</uriref> <kindref>http</kindref> <content-db>data-hub-FINAL</content-db> <modules-db>data-hub-MODULES</modules-db> <idref>15427288426559314135</idref> <nameref>data-hub-FINAL</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/data-hub-JOBS?group-id=Default</uriref> <kindref>http</kindref> <content-db>data-hub-JOBS</content-db> <modules-db>data-hub-MODULES</modules-db> <idref>5586643511435004736</idref> <nameref>data-hub-JOBS</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/data-hub-STAGING?group-id=Default</uriref> <kindref>http</kindref> <content-db>data-hub-STAGING</content-db> <modules-db>data-hub-MODULES</modules-db> <idref>10842453788764821876</idref> <nameref>data-hub-STAGING</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/data-hub-TRACING?group-id=Default</uriref> <kindref>http</kindref> <content-db>data-hub-TRACING</content-db> <modules-db>data-hub-MODULES</modules-db> <idref>16866661289646622013</idref> <nameref>data-hub-TRACING</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/HealthCheck?group-id=Default</uriref> <kindref>http</kindref> <content-db>App-Services</content-db> <idref>16530884482127520539</idref> <nameref>HealthCheck</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/Manage?group-id=Default</uriref> <kindref>http</kindref> <content-db>App-Services</content-db> <idref>15392081774558336614</idref> <nameref>Manage</nameref> </list-item> </list-items> <related-views> <related-view array=\"true\"> <view-type>root</view-type> <view-name>default</view-name> <view-uri>/manage/v2</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>metrics</view-name> <view-uri>/manage/v2/servers?view=metrics</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>package</view-name> <view-uri>/manage/v2/servers?view=package</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>schema</view-name> <view-uri>/manage/v2/servers?view=schema</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>status</view-name> <view-uri>/manage/v2/servers?view=status</view-uri> </related-view> </related-views> </server-default-list>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("Admin")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>Admin</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>Admin/</root> <authentication>digest</authentication> <port>8001</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>10800</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>false</debug-allow> <profile-allow>false</profile-allow> <default-xquery-version>0.9-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>/error-switch.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>rewriter.xqy</url-rewriter> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>Security</content-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("App-Services")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>App-Services</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>/</root> <authentication>digest</authentication> <port>8000</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>/MarkLogic/rest-api/8000-error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>/MarkLogic/rest-api/8000-rewriter.xml</url-rewriter> <rewrite-resolves-globally>true</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>Documents</content-database> <modules-database>Modules</modules-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("data-hub-FINAL")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>data-hub-FINAL</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>/</root> <port>8011</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <authentication>digest</authentication> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>true</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>json</default-error-format> <error-handler>/MarkLogic/rest-api/error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>/MarkLogic/rest-api/rewriter.xml</url-rewriter> <rewrite-resolves-globally>true</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>data-hub-FINAL</content-database> <modules-database>data-hub-MODULES</modules-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("data-hub-JOBS")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>data-hub-JOBS</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>/</root> <port>8013</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <authentication>digest</authentication> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>true</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>json</default-error-format> <error-handler>/MarkLogic/rest-api/error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>/MarkLogic/rest-api/rewriter.xml</url-rewriter> <rewrite-resolves-globally>true</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>data-hub-JOBS</content-database> <modules-database>data-hub-MODULES</modules-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("data-hub-STAGING")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>data-hub-STAGING</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>/</root> <port>8010</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <authentication>digest</authentication> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>true</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>json</default-error-format> <error-handler>/MarkLogic/rest-api/error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>/dhf-hub/4/rest-api/rewriter.xml</url-rewriter> <rewrite-resolves-globally>true</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>data-hub-STAGING</content-database> <modules-database>data-hub-MODULES</modules-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("data-hub-TRACING")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>data-hub-TRACING</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>/</root> <port>8012</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <authentication>digest</authentication> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>true</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>json</default-error-format> <error-handler>/MarkLogic/rest-api/error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>/data-hub/4/tracing/tracing-rewriter.xml</url-rewriter> <rewrite-resolves-globally>true</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>data-hub-TRACING</content-database> <modules-database>data-hub-MODULES</modules-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("HealthCheck")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>HealthCheck</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>HealthCheck/</root> <authentication>application-level</authentication> <port>7997</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>2</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler/> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter/> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>App-Services</content-database> <default-user>healthcheck</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("Manage")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>Manage</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>Apps/</root> <authentication>digest</authentication> <port>8002</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>manage/error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>manage/rewriter.xqy</url-rewriter> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>App-Services</content-database> <default-user>nobody</default-user> <privilege>http://marklogic.com/xdmp/privileges/manage</privilege> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(versions.getMarkLogicVersion()).andReturn("9.0-6"); replay(dh, serverManager, versions); dh.runPreInstallCheck(); assertTrue(dh.isServerVersionOk()); assertFalse(dh.isPortInUse(DatabaseKind.STAGING)); assertFalse(dh.isPortInUse(DatabaseKind.FINAL)); assertFalse(dh.isPortInUse(DatabaseKind.JOB)); assertTrue(dh.isSafeToInstall()); }
@Test public void testPreFlightCheckStagingPortTakenAndBadVersion() { List<Namespace> list = new ArrayList<>(); expect(serverManager.getAsXml()).andReturn(new ResourcesFragment(new Fragment("<server-default-list xmlns=\"http://marklogic.com/manage/servers\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://marklogic.com/manage/servers manage-servers.xsd\"> <meta> <uri>/manage/v2/servers</uri> <current-time>2017-10-01T19:15:38.140598-04:00</current-time> <elapsed-time units=\"sec\">0.030447</elapsed-time> </meta> <relations> <relation-group array=\"true\"> <typeref>groups</typeref> <relation-count units=\"quantity\">1</relation-count> <relation array=\"true\"> <uriref>/manage/v2/groups/Default</uriref> <idref>3341249095562999141</idref> <nameref>Default</nameref> </relation> </relation-group> </relations> <list-items> <list-count units=\"quantity\">8</list-count> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/Admin?group-id=Default</uriref> <kindref>http</kindref> <content-db>Security</content-db> <idref>7776582106827683360</idref> <nameref>Admin</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/App-Services?group-id=Default</uriref> <kindref>http</kindref> <content-db>Documents</content-db> <modules-db>Modules</modules-db> <idref>4626187627163603518</idref> <nameref>App-Services</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/port-stealer?group-id=Default</uriref> <kindref>http</kindref> <content-db>data-hub-STAGING</content-db> <modules-db>data-hub-MODULES</modules-db> <idref>10842453788764821876</idref> <nameref>port-stealer</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/HealthCheck?group-id=Default</uriref> <kindref>http</kindref> <content-db>App-Services</content-db> <idref>16530884482127520539</idref> <nameref>HealthCheck</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/Manage?group-id=Default</uriref> <kindref>http</kindref> <content-db>App-Services</content-db> <idref>15392081774558336614</idref> <nameref>Manage</nameref> </list-item> </list-items> <related-views> <related-view array=\"true\"> <view-type>root</view-type> <view-name>default</view-name> <view-uri>/manage/v2</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>metrics</view-name> <view-uri>/manage/v2/servers?view=metrics</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>package</view-name> <view-uri>/manage/v2/servers?view=package</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>schema</view-name> <view-uri>/manage/v2/servers?view=schema</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>status</view-name> <view-uri>/manage/v2/servers?view=status</view-uri> </related-view> </related-views> </server-default-list>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("Admin")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>Admin</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>Admin/</root> <authentication>digest</authentication> <port>8001</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>10800</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>false</debug-allow> <profile-allow>false</profile-allow> <default-xquery-version>0.9-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>/error-switch.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>rewriter.xqy</url-rewriter> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>Security</content-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("App-Services")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>App-Services</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>/</root> <authentication>digest</authentication> <port>8000</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>/MarkLogic/rest-api/8000-error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>/MarkLogic/rest-api/8000-rewriter.xml</url-rewriter> <rewrite-resolves-globally>true</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>Documents</content-database> <modules-database>Modules</modules-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("port-stealer")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>port-stealer</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>/</root> <port>8010</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <authentication>digest</authentication> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>true</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>json</default-error-format> <error-handler>/MarkLogic/rest-api/error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>/MarkLogic/rest-api/rewriter.xml</url-rewriter> <rewrite-resolves-globally>true</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>data-hub-FINAL</content-database> <modules-database>data-hub-MODULES</modules-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("HealthCheck")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>HealthCheck</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>HealthCheck/</root> <authentication>application-level</authentication> <port>7997</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>2</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler/> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter/> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>App-Services</content-database> <default-user>healthcheck</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("Manage")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>Manage</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>Apps/</root> <authentication>digest</authentication> <port>8002</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>manage/error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>manage/rewriter.xqy</url-rewriter> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>App-Services</content-database> <default-user>nobody</default-user> <privilege>http://marklogic.com/xdmp/privileges/manage</privilege> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(versions.getMarkLogicVersion()).andReturn("9.0-1"); replay(dh, versions, serverManager); dh.runPreInstallCheck(); assertFalse(dh.isServerVersionOk()); assertTrue(dh.isPortInUse(DatabaseKind.STAGING)); assertEquals("port-stealer", dh.getPortInUseBy(DatabaseKind.STAGING)); assertFalse(dh.isPortInUse(DatabaseKind.FINAL)); assertFalse(dh.isPortInUse(DatabaseKind.JOB)); assertFalse(dh.isSafeToInstall()); }
@Test public void testPreFlightCheckStagingPortTaken() { List<Namespace> list = new ArrayList<>(); expect(serverManager.getAsXml()).andReturn(new ResourcesFragment(new Fragment("<server-default-list xmlns=\"http://marklogic.com/manage/servers\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://marklogic.com/manage/servers manage-servers.xsd\"> <meta> <uri>/manage/v2/servers</uri> <current-time>2017-10-01T19:15:38.140598-04:00</current-time> <elapsed-time units=\"sec\">0.030447</elapsed-time> </meta> <relations> <relation-group array=\"true\"> <typeref>groups</typeref> <relation-count units=\"quantity\">1</relation-count> <relation array=\"true\"> <uriref>/manage/v2/groups/Default</uriref> <idref>3341249095562999141</idref> <nameref>Default</nameref> </relation> </relation-group> </relations> <list-items> <list-count units=\"quantity\">8</list-count> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/Admin?group-id=Default</uriref> <kindref>http</kindref> <content-db>Security</content-db> <idref>7776582106827683360</idref> <nameref>Admin</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/App-Services?group-id=Default</uriref> <kindref>http</kindref> <content-db>Documents</content-db> <modules-db>Modules</modules-db> <idref>4626187627163603518</idref> <nameref>App-Services</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/port-stealer?group-id=Default</uriref> <kindref>http</kindref> <content-db>data-hub-STAGING</content-db> <modules-db>data-hub-MODULES</modules-db> <idref>10842453788764821876</idref> <nameref>port-stealer</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/HealthCheck?group-id=Default</uriref> <kindref>http</kindref> <content-db>App-Services</content-db> <idref>16530884482127520539</idref> <nameref>HealthCheck</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/Manage?group-id=Default</uriref> <kindref>http</kindref> <content-db>App-Services</content-db> <idref>15392081774558336614</idref> <nameref>Manage</nameref> </list-item> </list-items> <related-views> <related-view array=\"true\"> <view-type>root</view-type> <view-name>default</view-name> <view-uri>/manage/v2</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>metrics</view-name> <view-uri>/manage/v2/servers?view=metrics</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>package</view-name> <view-uri>/manage/v2/servers?view=package</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>schema</view-name> <view-uri>/manage/v2/servers?view=schema</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>status</view-name> <view-uri>/manage/v2/servers?view=status</view-uri> </related-view> </related-views> </server-default-list>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("Admin")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>Admin</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>Admin/</root> <authentication>digest</authentication> <port>8001</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>10800</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>false</debug-allow> <profile-allow>false</profile-allow> <default-xquery-version>0.9-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>/error-switch.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>rewriter.xqy</url-rewriter> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>Security</content-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("App-Services")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>App-Services</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>/</root> <authentication>digest</authentication> <port>8000</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>/MarkLogic/rest-api/8000-error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>/MarkLogic/rest-api/8000-rewriter.xml</url-rewriter> <rewrite-resolves-globally>true</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>Documents</content-database> <modules-database>Modules</modules-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("port-stealer")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>port-stealer</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>/</root> <port>8010</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <authentication>digest</authentication> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>true</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>json</default-error-format> <error-handler>/MarkLogic/rest-api/error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>/MarkLogic/rest-api/rewriter.xml</url-rewriter> <rewrite-resolves-globally>true</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>data-hub-FINAL</content-database> <modules-database>data-hub-MODULES</modules-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("HealthCheck")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>HealthCheck</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>HealthCheck/</root> <authentication>application-level</authentication> <port>7997</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>2</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler/> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter/> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>App-Services</content-database> <default-user>healthcheck</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("Manage")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>Manage</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>Apps/</root> <authentication>digest</authentication> <port>8002</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>manage/error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>manage/rewriter.xqy</url-rewriter> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>App-Services</content-database> <default-user>nobody</default-user> <privilege>http://marklogic.com/xdmp/privileges/manage</privilege> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(versions.getMarkLogicVersion()).andReturn("9.0-6"); replay(serverManager, dh, versions); dh.runPreInstallCheck(); assertTrue(dh.isServerVersionOk()); assertTrue(dh.isPortInUse(DatabaseKind.STAGING)); assertEquals("port-stealer", dh.getPortInUseBy(DatabaseKind.STAGING)); assertFalse(dh.isPortInUse(DatabaseKind.FINAL)); assertFalse(dh.isPortInUse(DatabaseKind.JOB)); assertFalse(dh.isSafeToInstall()); }
@Test public void testPreFlightCheckFinalPortTaken() { List<Namespace> list = new ArrayList<>(); expect(serverManager.getAsXml()).andReturn(new ResourcesFragment(new Fragment("<server-default-list xmlns=\"http://marklogic.com/manage/servers\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://marklogic.com/manage/servers manage-servers.xsd\"> <meta> <uri>/manage/v2/servers</uri> <current-time>2017-10-01T19:15:38.140598-04:00</current-time> <elapsed-time units=\"sec\">0.030447</elapsed-time> </meta> <relations> <relation-group array=\"true\"> <typeref>groups</typeref> <relation-count units=\"quantity\">1</relation-count> <relation array=\"true\"> <uriref>/manage/v2/groups/Default</uriref> <idref>3341249095562999141</idref> <nameref>Default</nameref> </relation> </relation-group> </relations> <list-items> <list-count units=\"quantity\">8</list-count> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/Admin?group-id=Default</uriref> <kindref>http</kindref> <content-db>Security</content-db> <idref>7776582106827683360</idref> <nameref>Admin</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/App-Services?group-id=Default</uriref> <kindref>http</kindref> <content-db>Documents</content-db> <modules-db>Modules</modules-db> <idref>4626187627163603518</idref> <nameref>App-Services</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/port-stealer?group-id=Default</uriref> <kindref>http</kindref> <content-db>data-hub-STAGING</content-db> <modules-db>data-hub-MODULES</modules-db> <idref>10842453788764821876</idref> <nameref>port-stealer</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/HealthCheck?group-id=Default</uriref> <kindref>http</kindref> <content-db>App-Services</content-db> <idref>16530884482127520539</idref> <nameref>HealthCheck</nameref> </list-item> <list-item array=\"true\"> <relation-id>3341249095562999141</relation-id> <groupnameref>Default</groupnameref> <uriref>/manage/v2/servers/Manage?group-id=Default</uriref> <kindref>http</kindref> <content-db>App-Services</content-db> <idref>15392081774558336614</idref> <nameref>Manage</nameref> </list-item> </list-items> <related-views> <related-view array=\"true\"> <view-type>root</view-type> <view-name>default</view-name> <view-uri>/manage/v2</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>metrics</view-name> <view-uri>/manage/v2/servers?view=metrics</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>package</view-name> <view-uri>/manage/v2/servers?view=package</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>schema</view-name> <view-uri>/manage/v2/servers?view=schema</view-uri> </related-view> <related-view array=\"true\"> <view-type>list</view-type> <view-name>status</view-name> <view-uri>/manage/v2/servers?view=status</view-uri> </related-view> </related-views> </server-default-list>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("Admin")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>Admin</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>Admin/</root> <authentication>digest</authentication> <port>8001</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>10800</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>false</debug-allow> <profile-allow>false</profile-allow> <default-xquery-version>0.9-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>/error-switch.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>rewriter.xqy</url-rewriter> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>Security</content-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("App-Services")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>App-Services</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>/</root> <authentication>digest</authentication> <port>8000</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>/MarkLogic/rest-api/8000-error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>/MarkLogic/rest-api/8000-rewriter.xml</url-rewriter> <rewrite-resolves-globally>true</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>Documents</content-database> <modules-database>Modules</modules-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("port-stealer")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>port-stealer</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>/</root> <port>8011</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <authentication>digest</authentication> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>true</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>json</default-error-format> <error-handler>/MarkLogic/rest-api/error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>/MarkLogic/rest-api/rewriter.xml</url-rewriter> <rewrite-resolves-globally>true</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>data-hub-FINAL</content-database> <modules-database>data-hub-MODULES</modules-database> <default-user>nobody</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("HealthCheck")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>HealthCheck</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>HealthCheck/</root> <authentication>application-level</authentication> <port>7997</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>2</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler/> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter/> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>App-Services</content-database> <default-user>healthcheck</default-user> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(serverManager.getPropertiesAsXml("Manage")).andReturn(new ResourcesFragment(new Fragment("<http-server-properties xmlns=\"http://marklogic.com/manage\"> <server-name>Manage</server-name> <group-name>Default</group-name> <server-type>http</server-type> <enabled>true</enabled> <root>Apps/</root> <authentication>digest</authentication> <port>8002</port> <webDAV>false</webDAV> <execute>true</execute> <display-last-login>false</display-last-login> <address>0.0.0.0</address> <backlog>512</backlog> <threads>32</threads> <request-timeout>30</request-timeout> <keep-alive-timeout>5</keep-alive-timeout> <session-timeout>3600</session-timeout> <max-time-limit>3600</max-time-limit> <default-time-limit>600</default-time-limit> <max-inference-size>500</max-inference-size> <default-inference-size>100</default-inference-size> <static-expires>3600</static-expires> <pre-commit-trigger-depth>1000</pre-commit-trigger-depth> <pre-commit-trigger-limit>10000</pre-commit-trigger-limit> <collation>http://marklogic.com/collation/</collation> <internal-security>true</internal-security> <concurrent-request-limit>0</concurrent-request-limit> <compute-content-length>true</compute-content-length> <log-errors>false</log-errors> <debug-allow>true</debug-allow> <profile-allow>true</profile-allow> <default-xquery-version>1.0-ml</default-xquery-version> <multi-version-concurrency-control>contemporaneous</multi-version-concurrency-control> <distribute-timestamps>fast</distribute-timestamps> <output-sgml-character-entities>none</output-sgml-character-entities> <output-encoding>UTF-8</output-encoding> <output-method>default</output-method> <output-byte-order-mark>default</output-byte-order-mark> <output-cdata-section-namespace-uri/> <output-cdata-section-localname/> <output-doctype-public/> <output-doctype-system/> <output-escape-uri-attributes>default</output-escape-uri-attributes> <output-include-content-type>default</output-include-content-type> <output-indent>default</output-indent> <output-indent-untyped>default</output-indent-untyped> <output-indent-tabs>default</output-indent-tabs> <output-media-type/> <output-normalization-form>none</output-normalization-form> <output-omit-xml-declaration>default</output-omit-xml-declaration> <output-standalone>omit</output-standalone> <output-undeclare-prefixes>default</output-undeclare-prefixes> <output-version/> <output-include-default-attributes>default</output-include-default-attributes> <default-error-format>compatible</default-error-format> <error-handler>manage/error-handler.xqy</error-handler> <schemas/> <namespaces/> <module-locations/> <request-blackouts/> <url-rewriter>manage/rewriter.xqy</url-rewriter> <rewrite-resolves-globally>false</rewrite-resolves-globally> <ssl-allow-sslv3>true</ssl-allow-sslv3> <ssl-allow-tls>true</ssl-allow-tls> <ssl-disable-sslv3>false</ssl-disable-sslv3> <ssl-disable-tlsv1>false</ssl-disable-tlsv1> <ssl-disable-tlsv1-1>false</ssl-disable-tlsv1-1> <ssl-disable-tlsv1-2>false</ssl-disable-tlsv1-2> <ssl-hostname/> <ssl-ciphers>ALL:!LOW:@STRENGTH</ssl-ciphers> <ssl-require-client-certificate>true</ssl-require-client-certificate> <content-database>App-Services</content-database> <default-user>nobody</default-user> <privilege>http://marklogic.com/xdmp/privileges/manage</privilege> </http-server-properties>", list.toArray(new Namespace[] {})))); expect(versions.getMarkLogicVersion()).andReturn("9.0-6"); replay(dh, versions, serverManager); dh.runPreInstallCheck(); assertTrue(dh.isServerVersionOk()); assertFalse(dh.isPortInUse(DatabaseKind.STAGING)); assertTrue(dh.isPortInUse(DatabaseKind.FINAL)); assertEquals("port-stealer", dh.getPortInUseBy(DatabaseKind.FINAL)); assertFalse(dh.isPortInUse(DatabaseKind.JOB)); assertFalse(dh.isSafeToInstall()); } }