Skip to content

Commit

Permalink
Merge branch 'release/version2.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
brianloss committed Mar 25, 2019
2 parents c3f35b0 + 40f4270 commit e965048
Show file tree
Hide file tree
Showing 88 changed files with 381 additions and 661 deletions.
@@ -1,19 +1,20 @@

# You may override DW_WILDFLY_DIST_URI in your env ahead of time, and set as file:///path/to/file.tar.gz for local tarball, if needed
DW_WILDFLY_DIST_URI="${DW_WILDFLY_DIST_URI:-http://download.jboss.org/wildfly/10.1.0.Final/wildfly-10.1.0.Final.tar.gz}"
DW_WILDFLY_DIST_URI="${DW_WILDFLY_DIST_URI:-http://download.jboss.org/wildfly/16.0.0.Final/wildfly-16.0.0.Final.tar.gz}"
DW_WILDFLY_DIST="$( downloadTarball "${DW_WILDFLY_DIST_URI}" "${DW_DATAWAVE_SERVICE_DIR}" && echo "${tarball}" )"
DW_WILDFLY_BASEDIR="wildfly-install"
DW_WILDFLY_SYMLINK="wildfly"

export WILDFLY_HOME="${DW_CLOUD_HOME}/${DW_WILDFLY_SYMLINK}"
export WILDFLY_HOME="$(readlink -f ${DW_CLOUD_HOME}/${DW_WILDFLY_SYMLINK})"
export JBOSS_HOME="${WILDFLY_HOME}"
export PATH="${WILDFLY_HOME}/bin:${PATH}"
export DW_DATAWAVE_WEB_JAVA_OPTS="-Duser.timezone=GMT -Dfile.encoding=UTF-8"

DW_DATAWAVE_WEB_CMD_START="( cd "${WILDFLY_HOME}/bin" && nohup ./standalone.sh -c standalone-full.xml & )"
DW_DATAWAVE_WEB_CMD_START_DEBUG="( cd "${WILDFLY_HOME}/bin" && nohup ./standalone.sh --debug -c standalone-full.xml & )"
DW_DATAWAVE_WEB_CMD_START="( cd "${WILDFLY_HOME}/bin" && JAVA_OPTS=\"$DW_DATAWAVE_WEB_JAVA_OPTS\" nohup ./standalone.sh -c standalone-full.xml & )"
DW_DATAWAVE_WEB_CMD_START_DEBUG="( cd "${WILDFLY_HOME}/bin" && JAVA_OPTS=\"$DW_DATAWAVE_WEB_JAVA_OPTS\" nohup ./standalone.sh --debug -c standalone-full.xml & )"
DW_DATAWAVE_WEB_CMD_STOP="datawaveWebIsRunning && [[ ! -z \$DW_DATAWAVE_WEB_PID_LIST ]] && kill -15 \$DW_DATAWAVE_WEB_PID_LIST"

DW_DATAWAVE_WEB_CMD_FIND_ALL_PIDS="pgrep -f 'jboss.home.dir=${DW_CLOUD_HOME}/${DW_WILDFLY_SYMLINK}'"
DW_DATAWAVE_WEB_CMD_FIND_ALL_PIDS="pgrep -f 'jboss.home.dir=${WILDFLY_HOME}'"

DW_DATAWAVE_WEB_SYMLINK="datawave-webservice"
DW_DATAWAVE_WEB_BASEDIR="datawave-webservice-install"
Expand Down
Expand Up @@ -346,7 +346,7 @@ function prettyPrintTestResponse() {
# defined in bin/query.sh
prettyPrintJson "${ACTUAL_RESPONSE_BODY}"

elif [ "${ACTUAL_RESPONSE_TYPE}" == "application/xml" ] ; then
elif [ "${ACTUAL_RESPONSE_TYPE}" == "application/xml;charset=UTF-8" ] ; then
# defined in bin/query.sh
prettyPrintXml "${ACTUAL_RESPONSE_BODY}"
else
Expand Down Expand Up @@ -459,7 +459,7 @@ function configureCloseQueryTest() {
QueryCloseTest \
"Closes the test query as necessary" \
"-X PUT ${URI_ROOT}/Query/${1}/close" \
application/xml \
"application/xml;charset=UTF-8" \
200
}

Expand All @@ -468,10 +468,10 @@ function setQueryIdFromResponse() {
DW_QUERY_ID=""

case "${ACTUAL_RESPONSE_TYPE}" in
application/json)
application/json*)
setQueryIdFromResponseJson "${ACTUAL_RESPONSE_BODY}"
;;
application/xml)
application/xml*)
setQueryIdFromResponseXml "${ACTUAL_RESPONSE_BODY}"
;;
*)
Expand Down
Expand Up @@ -15,7 +15,7 @@ configureTest \
CreateQuery \
"Creates DiscoveryQuery for wikipedia articles containing the word 'anarchy' (i.e., hit count by date)" \
"--header 'Content-Type: application/x-www-form-urlencoded' ${DW_CURL_DATA} -X POST ${URI_ROOT}/Query/DiscoveryQuery/create" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest --set-query-id
Expand All @@ -27,7 +27,7 @@ configureTest \
GetPagedResults \
"Gets the first page of results for the CreateQuery test" \
"-X GET ${URI_ROOT}/Query/${DW_QUERY_ID}/next" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest
Expand Down
Expand Up @@ -17,14 +17,14 @@ configureTest \
CreateAndNext \
"Creates a JEXL-syntax edge query and gets first page of results with a single REST call" \
"--header 'Content-Type: application/x-www-form-urlencoded' ${DW_CURL_DATA} -X POST ${URI_ROOT}/Query/EdgeQuery/createAndNext" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest --set-query-id

################################################################
# Test /Query/${DW_QUERY_ID}/close endpoint

configureCloseQueryTest ${DW_QUERY_ID}
configureCloseQueryTest ${DW_QUERY_ID} 200

# This last test is executed by run.sh, as usual
Expand Up @@ -15,14 +15,14 @@ configureTest \
QueryMissingDataError \
"Uses ErrorEventQuery to find events written to DW's error* tables at ingest time due to MISSING_DATA_ERROR" \
"--header 'Content-Type: application/x-www-form-urlencoded' ${DW_CURL_DATA} -X POST ${URI_ROOT}/Query/ErrorEventQuery/createAndNext" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest --set-query-id

################################################################
# Close the query

configureCloseQueryTest ${DW_QUERY_ID}
configureCloseQueryTest ${DW_QUERY_ID} 200

# Last test is executed by run.sh, as usual
Expand Up @@ -3,5 +3,5 @@ configureTest \
IntentionalError \
"Creates an error for EventQuery by omitting all required query params" \
"--header 'Content-Type: application/x-www-form-urlencoded' -X POST ${URI_ROOT}/Query/EventQuery/create" \
application/xml \
"application/xml;charset=UTF-8" \
500
Expand Up @@ -21,7 +21,7 @@ configureTest \
CreateJexlUnfielded \
"Creates an equivalent 'unfielded' EventQuery w/JEXL query syntax via '_ANYFIELD_' identifier" \
"--header 'Content-Type: application/x-www-form-urlencoded' ${DW_CURL_DATA} -X POST ${URI_ROOT}/Query/EventQuery/create" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest --set-query-id
Expand All @@ -33,7 +33,7 @@ configureTest \
JexlUnfieldedNext \
"Gets the first page of results for the CreateJexlUnfielded test" \
"-X GET ${URI_ROOT}/Query/${DW_QUERY_ID}/next" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest
Expand Down Expand Up @@ -66,7 +66,7 @@ configureTest \
CreateJexlFielded \
"Creates a valid, fielded EventQuery w/ JEXL query syntax" \
"--header 'Content-Type: application/x-www-form-urlencoded' ${DW_CURL_DATA} -X POST ${URI_ROOT}/Query/EventQuery/create" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest --set-query-id
Expand Down
Expand Up @@ -54,7 +54,7 @@ configureTest \
GroupedWithSameGreatgrandparent \
"Attempt to match specific cousin elements originating from the same JSON 'cast' array" \
"--header 'Content-Type: application/x-www-form-urlencoded' ${DW_CURL_DATA} -X POST ${URI_ROOT}/Query/EventQuery/create" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest --set-query-id
Expand Down Expand Up @@ -101,7 +101,7 @@ configureTest \
GroupedWithSameParent \
"Attempt to match 'ID' and 'NAME' values that are siblings within 'PERSON' parent object" \
"--header 'Content-Type: application/x-www-form-urlencoded' ${DW_CURL_DATA} -X POST ${URI_ROOT}/Query/EventQuery/create" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest --set-query-id
Expand Down Expand Up @@ -142,7 +142,7 @@ configureTest \
CreateNoMatchForGroupedSiblings \
"Attempt to find 'NAME' field siblings that are actually cousins. Gets 204 - No results" \
"--header 'Content-Type: application/x-www-form-urlencoded' ${DW_CURL_DATA} -X POST ${URI_ROOT}/Query/EventQuery/create" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest --set-query-id
Expand Down
Expand Up @@ -18,7 +18,7 @@ configureTest \
CreateLuceneUnfieldedQuery \
"Creates a valid, unfielded EventQuery w/ LUCENE query syntax" \
"--header 'Content-Type: application/x-www-form-urlencoded' ${DW_CURL_DATA} -X POST ${URI_ROOT}/Query/EventQuery/create" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest --set-query-id
Expand All @@ -30,7 +30,7 @@ configureTest \
LuceneUnfieldedQueryPage1 \
"Gets the first page of results for the CreateLuceneUnfieldedQuery test" \
"-X GET ${URI_ROOT}/Query/${DW_QUERY_ID}/next" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest
Expand Down Expand Up @@ -63,7 +63,7 @@ configureTest \
CreateLuceneFieldedQuery \
"Creates a valid, fielded EventQuery w/ LUCENE query syntax" \
"--header 'Content-Type: application/x-www-form-urlencoded' ${DW_CURL_DATA} -X POST ${URI_ROOT}/Query/EventQuery/create" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest --set-query-id
Expand Down
Expand Up @@ -3,5 +3,5 @@ configureTest \
ListQueryLogicGET \
"Gets DataWave's deployed query logics (configured by QueryLogicFactory.xml)" \
"-X GET ${URI_ROOT}/Query/listQueryLogic" \
application/xml \
"application/xml;charset=UTF-8" \
200
Expand Up @@ -3,5 +3,5 @@ configureTest \
ListEffectiveAuthsGET \
"Gets all roles & effective Accumulo auths for the current user (PKI) identity" \
"-X GET ${URI_ROOT}/Security/User/listEffectiveAuthorizations" \
application/xml \
"application/xml;charset=UTF-8" \
200
Expand Up @@ -19,7 +19,7 @@ configureTest \
LookupWikipediaByPageId \
"Performs lookup based on the PAGE_ID field in our wiki data" \
"-X GET ${URI_ROOT}/Query/lookupUUID/${TEST_UID_TYPE}/${TEST_UID}" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest
Expand All @@ -34,7 +34,7 @@ configureTest \
LookupWikipediaByPageTitle \
"Performs lookup based on the PAGE_TITLE field in our wiki data" \
"-X GET ${URI_ROOT}/Query/lookupUUID/${TEST_UID_TYPE}/${TEST_UID}" \
application/xml \
"application/xml;charset=UTF-8" \
200

runTest
Expand Down Expand Up @@ -64,7 +64,7 @@ configureTest \
LookupUnregisteredUidType \
"Performs lookup on nonexistent uidType and nonexistent uid" \
"-X GET ${URI_ROOT}/Query/lookupUUID/${TEST_UID_TYPE}/${TEST_UID}" \
application/xml \
"application/xml;charset=UTF-8" \
500

# This last test is executed by run.sh, as usual
Expand Up @@ -21,7 +21,7 @@ configureTest \
CreateAndNext \
"Creates a JEXL-syntax QueryMetrics query and gets the first page of results" \
"--header 'Content-Type: application/x-www-form-urlencoded' ${DW_CURL_DATA} -X POST ${URI_ROOT}/Query/QueryMetricsQuery/createAndNext" \
application/xml \
"application/xml;charset=UTF-8" \
200

# NOTE:
Expand Down
27 changes: 6 additions & 21 deletions docs/pom.xml
Expand Up @@ -166,6 +166,11 @@
<artifactId>jackson-jaxrs</artifactId>
<version>1.8.8</version>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-undertow</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand All @@ -176,16 +181,6 @@
<artifactId>jackson-module-jaxb-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-servlet</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -196,16 +191,6 @@
<artifactId>deltaspike-core-impl</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-commons</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core-client</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-commons</artifactId>
Expand Down Expand Up @@ -266,7 +251,7 @@
<dependencies>
<dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.2_spec</artifactId>
<artifactId>jboss-annotations-api_1.3_spec</artifactId>
<version>1.0.0.Final</version>
</dependency>
</dependencies>
Expand Down

0 comments on commit e965048

Please sign in to comment.