Skip to content

Commit d610131

Browse files
committed
Use a unique ID for the test entity
1 parent eeff0ae commit d610131

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/snippets/src/test/java/com/example/datastore/RegionalEndpointIT.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public void testRegionalEndpoint() throws Exception {
5656
// The kind for the new entity
5757
String kind = "Task";
5858
// The name/ID for the new entity
59-
String name = "sampletask1";
59+
long id = 5072090633863168L;
6060
// The Cloud Datastore key for the new entity
61-
Key taskKey = datastoreWithEndpoint.newKeyFactory().setKind(kind).newKey(name);
61+
Key taskKey = datastoreWithEndpoint.newKeyFactory().setKind(kind).newKey(id);
6262

6363
// Prepares the new entity
6464
Entity task = Entity.newBuilder(taskKey).set("description", "Buy milk").build();

0 commit comments

Comments
 (0)