-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronous queries are no longer stored in ApiJobStore.
-- The `delay` operator considers `Observable::onCompleted` to be an "emitted item." Therefore, the job row was still being stored in the ApiJobStore even when the query was synchronous. --This has been fixed by replacing `delay` with a subscription, and/or zip when appropriate.
- Loading branch information
Andrew Cholewa
committed
Sep 23, 2016
1 parent
33787a2
commit 878a367
Showing
2 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...src/test/groovy/com/yahoo/bard/webservice/async/SynchronousQueriesAreNotStoredSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.yahoo.bard.webservice.async | ||
|
||
import com.yahoo.bard.webservice.util.JsonSlurper | ||
|
||
/** | ||
* Created by acholewa on 9/23/16. | ||
*/ | ||
class SynchronousQueriesAreNotStoredSpec extends AsyncFunctionalSpec { | ||
@Override | ||
Map<String, Closure<String>> getResultsToTargetFunctions() { | ||
return [ | ||
data: {"data/shapes/day"}, | ||
jobs: {"jobs"} | ||
] | ||
} | ||
|
||
@Override | ||
Map<String, Closure<Void>> getResultAssertions() { | ||
return [ | ||
data: {assert it.status == 200}, | ||
jobs: { | ||
assert !new JsonSlurper().parseText(it.readEntity(String)).jobs | ||
} | ||
] | ||
} | ||
|
||
@Override | ||
Map<String, Closure<Map<String, List<String>>>> getQueryParameters() { | ||
return [ | ||
data: {[ | ||
metrics: ["height"], | ||
asyncAfter: ["never"], | ||
dateTime: ["2016-08-30/2016-08-31"] | ||
]}, | ||
jobs: {[ | ||
filters: ["userId-eq[greg]"] | ||
]} | ||
] | ||
} | ||
|
||
@Override | ||
Closure<String> getFakeDruidResponse() { | ||
return {"[]"} | ||
} | ||
} |