Skip to content

Commit 2b23bd6

Browse files
committed
review feedback
1 parent 8fa8c3f commit 2b23bd6

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

datastore-v1-proto-client/src/test/java/com/google/datastore/v1/client/it/ITDatastoreProtoClientTest.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import static com.google.datastore.v1.client.DatastoreHelper.makeFilter;
1919
import static com.google.datastore.v1.client.DatastoreHelper.makeValue;
2020

21+
import com.google.common.truth.Truth;
2122
import com.google.datastore.v1.Filter;
2223
import com.google.datastore.v1.KindExpression;
2324
import com.google.datastore.v1.PartitionId;
@@ -29,7 +30,6 @@
2930
import java.io.IOException;
3031
import java.security.GeneralSecurityException;
3132
import java.util.List;
32-
import org.junit.Assert;
3333
import org.junit.Before;
3434
import org.junit.Test;
3535

@@ -61,10 +61,11 @@ public void testQuerySplitterWithDefaultDb() throws DatastoreException {
6161

6262
List<Query> splits =
6363
DatastoreHelper.getQuerySplitter().getSplits(query, PARTITION, 2, DATASTORE);
64+
Truth.assertThat(splits).isNotEmpty();
6465
splits.forEach(
6566
split -> {
66-
Assert.assertEquals(KIND, split.getKind(0).getName());
67-
Assert.assertEquals(propertyFilter, split.getFilter());
67+
Truth.assertThat(split.getKind(0).getName()).isEqualTo(KIND);
68+
Truth.assertThat(split.getFilter()).isEqualTo(propertyFilter);
6869
});
6970
}
7071

@@ -82,10 +83,12 @@ public void testQuerySplitterWithDb() throws DatastoreException {
8283

8384
List<Query> splits =
8485
DatastoreHelper.getQuerySplitter().getSplits(query, PARTITION, 2, DATASTORE);
86+
87+
Truth.assertThat(splits).isNotEmpty();
8588
splits.forEach(
8689
split -> {
87-
Assert.assertEquals(KIND, split.getKind(0).getName());
88-
Assert.assertEquals(propertyFilter, split.getFilter());
90+
Truth.assertThat(split.getKind(0).getName()).isEqualTo(KIND);
91+
Truth.assertThat(split.getFilter()).isEqualTo(propertyFilter);
8992
});
9093
}
9194
}

google-cloud-datastore/src/main/java/com/google/cloud/datastore/testing/LocalDatastoreHelper.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,8 @@ public DatastoreOptions getOptions() {
209209
* Returns a {@link DatastoreOptions} instance that sets the host to use the Datastore emulator on
210210
* localhost. The default namespace is set to {@code namespace}.
211211
*
212-
* @deprecated use setNamespace and then build() instead
212+
* <p>Please use setNamespace and then build() instead.
213213
*/
214-
@Deprecated
215214
public DatastoreOptions getOptions(String namespace) {
216215
return optionsBuilder.setNamespace(namespace).build();
217216
}

0 commit comments

Comments
 (0)