Skip to content

Commit

Permalink
Merge pull request Azure#10 from Azure/moderakh/docs
Browse files Browse the repository at this point in the history
minor update to .gitignore
  • Loading branch information
moderakh committed Oct 5, 2017
2 parents 7ec0978 + 6f2a224 commit c5a85b0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ hs_err_pid*
# MacOS files #
.DS_Store

# Eclipse files #
# IDE files #
.project
.settings
.classpath
.idea

doc
docs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/**
* The MIT License (MIT)
* Copyright (c) 2017 Microsoft Corporation
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand Down Expand Up @@ -50,12 +50,12 @@

public class TestSuiteBase {

protected static final int TIMEOUT = 4000;
protected static final int SETUP_TIMEOUT = 6000;
protected static final int SHUTDOWN_TIMEOUT = 6000;
protected static final int TIMEOUT = 8000;
protected static final int SETUP_TIMEOUT = 12000;
protected static final int SHUTDOWN_TIMEOUT = 12000;

protected int subscriberValidationTimeout = TIMEOUT;

static {
HttpClientFactory.DISABLE_HOST_NAME_VERIFICATION = true;
}
Expand Down Expand Up @@ -95,13 +95,13 @@ static protected DocumentCollection getCollectionDefinition() {
}

public static void deleteCollectionIfExists(AsyncDocumentClient client, String databaseLink, String collectionId) {
List<DocumentCollection> res = client.queryCollections(databaseLink,
List<DocumentCollection> res = client.queryCollections(databaseLink,
String.format("SELECT * FROM root r where r.id = '%s'", collectionId), null).toBlocking().single().getResults();
if (!res.isEmpty()) {
deleteCollection(client, Utils.getCollectionNameLink(databaseLink, collectionId));
}
if (!res.isEmpty()) {
deleteCollection(client, Utils.getCollectionNameLink(databaseLink, collectionId));
}
}

public static void deleteCollection(AsyncDocumentClient client, String collectionLink) {
client.deleteCollection(collectionLink, null).toBlocking().single();
}
Expand Down Expand Up @@ -152,13 +152,13 @@ public static <T extends Resource> void validateSuccess(Observable<ResourceRespo
validator.validate(testSubscriber.getOnNextEvents().get(0));
}

public <T extends Resource> void validateFailure(Observable<ResourceResponse<T>> observable,
public <T extends Resource> void validateFailure(Observable<ResourceResponse<T>> observable,
FailureValidator validator)
throws InterruptedException {
validateFailure(observable, validator, subscriberValidationTimeout);
}

public static <T extends Resource> void validateFailure(Observable<ResourceResponse<T>> observable,
public static <T extends Resource> void validateFailure(Observable<ResourceResponse<T>> observable,
FailureValidator validator, long timeout)
throws InterruptedException {

Expand All @@ -169,7 +169,7 @@ public static <T extends Resource> void validateFailure(Observable<ResourceRespo
testSubscriber.assertNotCompleted();
testSubscriber.assertTerminalEvent();
assertThat(testSubscriber.getOnErrorEvents()).hasSize(1);
validator.validate(testSubscriber.getOnErrorEvents().get(0));
validator.validate(testSubscriber.getOnErrorEvents().get(0));
}

public <T extends Resource> void validateQuerySuccess(Observable<FeedResponsePage<T>> observable,
Expand All @@ -189,13 +189,13 @@ public static <T extends Resource> void validateQuerySuccess(Observable<FeedResp
validator.validate(testSubscriber.getOnNextEvents());
}

public <T extends Resource> void validateQueryFailure(Observable<FeedResponsePage<T>> observable,
public <T extends Resource> void validateQueryFailure(Observable<FeedResponsePage<T>> observable,
FailureValidator validator)
throws InterruptedException {
validateQueryFailure(observable, validator, subscriberValidationTimeout);
}

public static <T extends Resource> void validateQueryFailure(Observable<FeedResponsePage<T>> observable,
public static <T extends Resource> void validateQueryFailure(Observable<FeedResponsePage<T>> observable,
FailureValidator validator, long timeout)
throws InterruptedException {

Expand All @@ -206,7 +206,7 @@ public static <T extends Resource> void validateQueryFailure(Observable<FeedResp
testSubscriber.assertNotCompleted();
testSubscriber.assertTerminalEvent();
assertThat(testSubscriber.getOnErrorEvents()).hasSize(1);
validator.validate(testSubscriber.getOnErrorEvents().get(0));
validator.validate(testSubscriber.getOnErrorEvents().get(0));
}

@DataProvider
Expand Down

0 comments on commit c5a85b0

Please sign in to comment.