[domain sharding] Freeup main domain when domain sharding is enabled (#9060)

* [domain sharding] Freeup main domain when domain sharding is enabled

* add change per comment + extra cleanup
This commit is contained in:
Grace Guo
2020-02-03 11:28:39 -08:00
committed by GitHub
parent 848c565c8c
commit bee913bbb1
3 changed files with 14 additions and 11 deletions

View File

@@ -163,13 +163,8 @@ describe('exploreUtils', () => {
endpointType: 'json',
allowDomainSharding: true,
}).url;
expect(url).toMatch(availableDomains[0]);
url = getExploreUrlAndPayload({
formData,
endpointType: 'json',
allowDomainSharding: true,
}).url;
// skip main domain for fetching chart if domain sharding is enabled
// to leave main domain free for other calls like fav star, save change, etc.
expect(url).toMatch(availableDomains[1]);
url = getExploreUrlAndPayload({
@@ -192,7 +187,7 @@ describe('exploreUtils', () => {
endpointType: 'json',
allowDomainSharding: true,
}).url;
expect(url).toMatch(availableDomains[0]);
expect(url).toMatch(availableDomains[1]);
});
it('not generate url to different domains without flag', () => {
let csvURL = getExploreUrlAndPayload({