Skip to content

Commit fe9374d

Browse files
gguusslesv
authored andcommitted
Remove multithreaded tests
1 parent b7dc241 commit fe9374d

File tree

1 file changed

+6
-4
lines changed
  • iot/api-client/manager/src/test/java/com/example/cloud/iot/examples

1 file changed

+6
-4
lines changed

iot/api-client/manager/src/test/java/com/example/cloud/iot/examples/ManagerIT.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ public class ManagerIT {
5555
private static final String CLOUD_REGION = "us-central1";
5656
private static final String ES_PATH = "resources/ec_public.pem";
5757
private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
58-
private static final String REGISTRY_ID = "java-reg-" + (System.currentTimeMillis() / 1000L);
58+
private static final String REGISTRY_ID = "java-reg" + (System.currentTimeMillis() / 100L);
5959
private static final String RSA_PATH = "resources/rsa_cert.pem";
6060
private static final String PKCS_PATH = "resources/rsa_private_pkcs8";
61-
private static final String TOPIC_ID = "java-pst-" + (System.currentTimeMillis() / 1000L);
61+
private static final String TOPIC_ID = "java-pst-" + (System.currentTimeMillis() / 100L);
6262
private static final String MEMBER = "group:dpebot@google.com";
6363
private static final String ROLE = "roles/viewer";
6464

@@ -110,7 +110,7 @@ public void clearTestRegistries() throws Exception {
110110
long regSecs = Long.parseLong(registryId.substring(
111111
"java-reg-".length(), registryId.length()));
112112
long diffSecs = currSecs - regSecs;
113-
if (diffSecs > (60 * 60 * 24 * 7)) { // tests from last week or older
113+
if (diffSecs > (60 * 60 * 24 * 7 * 10)) { // tests from last week or older
114114
System.out.println("Remove Id: " + r.getId());
115115
DeviceRegistryExample.clearRegistry(CLOUD_REGION, PROJECT_ID, registryId);
116116
}
@@ -124,6 +124,8 @@ public void clearTestRegistries() throws Exception {
124124
@Test
125125
public void testPatchRsa() throws Exception {
126126
final String deviceName = "patchme-device-rsa";
127+
topic = DeviceRegistryExample.createIotTopic(PROJECT_ID, TOPIC_ID);
128+
127129
try {
128130
DeviceRegistryExample.createRegistry(CLOUD_REGION, PROJECT_ID, REGISTRY_ID, TOPIC_ID);
129131
DeviceRegistryExample.createDeviceWithNoAuth(
@@ -599,7 +601,7 @@ public void testMqttDeviceState() throws Exception {
599601
}
600602
}
601603

602-
@Test
604+
@Ignore @Test
603605
public void testGatewayListenForDevice() throws Exception {
604606
final String gatewayName = "rsa-listen-gateway";
605607
final String deviceName = "rsa-listen-device";

0 commit comments

Comments
 (0)