Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
jdyer1 committed Apr 2, 2024
1 parent 92e12a6 commit 7d39ab2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ private void recordRequest(HttpServletRequest req, HttpServletResponse resp) {
qs = qs == null ? "" : qs;
Object responseBody = null;

// Tests can set this up to return different response bodies based on substrings in the query string
// Tests can set this up to return different response bodies based on substrings in the query
// string
for (Map.Entry<String, Object> entry : responseBodyByQueryFragment.entrySet()) {
if (qs.contains(entry.getKey())) {
responseBody = entry.getValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ protected void testUpdateAsync() throws Exception {
ResponseParser rp = new XMLResponseParser();
String url = getBaseUrl();
HttpSolrClientBuilderBase<?, ?> b =
builder(url, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_CONNECTION_TIMEOUT).withResponseParser(rp);
builder(url, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_CONNECTION_TIMEOUT).withResponseParser(rp);
int limit = 10;
CountDownLatch cdl = new CountDownLatch(limit);
DebugAsyncListener[] listeners = new DebugAsyncListener[limit];
Expand All @@ -555,7 +555,11 @@ protected void testUpdateAsync() throws Exception {
// ensure the collection is empty to start
client.deleteByQuery(COLLECTION_1, "*:*");
client.commit(COLLECTION_1);
QueryResponse qr = client.query(COLLECTION_1, new MapSolrParams(Collections.singletonMap("q", "*:*")), SolrRequest.METHOD.POST);
QueryResponse qr =
client.query(
COLLECTION_1,
new MapSolrParams(Collections.singletonMap("q", "*:*")),
SolrRequest.METHOD.POST);
assertEquals(0, qr.getResults().getNumFound());

for (int i = 0; i < limit; i++) {
Expand All @@ -569,10 +573,13 @@ protected void testUpdateAsync() throws Exception {
client.commit(COLLECTION_1);

// check that the correct number of documents were added
qr = client.query(COLLECTION_1, new MapSolrParams(Collections.singletonMap("q", "*:*")), SolrRequest.METHOD.POST);
qr =
client.query(
COLLECTION_1,
new MapSolrParams(Collections.singletonMap("q", "*:*")),
SolrRequest.METHOD.POST);
assertEquals(limit, qr.getResults().getNumFound());
}

}

protected void testQueryAsync() throws Exception {
Expand Down

0 comments on commit 7d39ab2

Please sign in to comment.