GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: Add junit timeout rule to unittests folder (#5587) · mithenks/java-docs-samples@4a488d7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • unittests/src/test/java/com/google/appengine/samples
    • AuthenticationTest.java
    • BaseTestConfiguration.java
    • DeferredTaskTest.java
    • LocalCustomPolicyHighRepDatastoreTest.java
    • LocalDatastoreTest.java
    • LocalHighRepDatastoreTest.java
    • LocalMemcacheTest.java
    • LocalUrlFetchTest.java
    • MyFirstTest.java
    • ShortTest.java
    • TaskQueueConfigTest.java
    • TaskQueueTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎unittests/src/test/java/com/google/appengine/samples/AuthenticationTest.java‎

Copy file name to clipboardExpand all lines: unittests/src/test/java/com/google/appengine/samples/AuthenticationTest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.junit.Before;
2929
import org.junit.Test;
3030

31-
public class AuthenticationTest {
31+
public class AuthenticationTest extends BaseTestConfiguration {
3232

3333
private final LocalServiceTestHelper helper =
3434
new LocalServiceTestHelper(new LocalUserServiceTestConfig())
Collapse file

‎unittests/src/test/java/com/google/appengine/samples/BaseTestConfiguration.java‎

Copy file name to clipboard
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright 2021 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.appengine.samples;
18+
19+
import java.util.concurrent.TimeUnit;
20+
import org.junit.Rule;
21+
import org.junit.rules.Timeout;
22+
23+
public abstract class BaseTestConfiguration {
24+
@Rule public Timeout testTimeout = new Timeout(5, TimeUnit.MINUTES);
25+
}
Collapse file

‎unittests/src/test/java/com/google/appengine/samples/DeferredTaskTest.java‎

Copy file name to clipboardExpand all lines: unittests/src/test/java/com/google/appengine/samples/DeferredTaskTest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import org.junit.Before;
3131
import org.junit.Test;
3232

33-
public class DeferredTaskTest {
33+
public class DeferredTaskTest extends BaseTestConfiguration {
3434

3535
// Unlike CountDownLatch, TaskCountDownlatch lets us reset.
3636
private final LocalTaskQueueTestConfig.TaskCountDownLatch latch =
Collapse file

‎unittests/src/test/java/com/google/appengine/samples/LocalCustomPolicyHighRepDatastoreTest.java‎

Copy file name to clipboardExpand all lines: unittests/src/test/java/com/google/appengine/samples/LocalCustomPolicyHighRepDatastoreTest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import org.junit.Before;
3434
import org.junit.Test;
3535

36-
public class LocalCustomPolicyHighRepDatastoreTest {
36+
public class LocalCustomPolicyHighRepDatastoreTest extends BaseTestConfiguration {
3737
private static final class CustomHighRepJobPolicy implements HighRepJobPolicy {
3838
static int newJobCounter = 0;
3939
static int existingJobCounter = 0;
Collapse file

‎unittests/src/test/java/com/google/appengine/samples/LocalDatastoreTest.java‎

Copy file name to clipboardExpand all lines: unittests/src/test/java/com/google/appengine/samples/LocalDatastoreTest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import org.junit.Before;
3232
import org.junit.Test;
3333

34-
public class LocalDatastoreTest {
34+
public class LocalDatastoreTest extends BaseTestConfiguration {
3535

3636
private final LocalServiceTestHelper helper =
3737
new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());
Collapse file

‎unittests/src/test/java/com/google/appengine/samples/LocalHighRepDatastoreTest.java‎

Copy file name to clipboardExpand all lines: unittests/src/test/java/com/google/appengine/samples/LocalHighRepDatastoreTest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import org.junit.Before;
3434
import org.junit.Test;
3535

36-
public class LocalHighRepDatastoreTest {
36+
public class LocalHighRepDatastoreTest extends BaseTestConfiguration {
3737

3838
// Maximum eventual consistency.
3939
private final LocalServiceTestHelper helper =
Collapse file

‎unittests/src/test/java/com/google/appengine/samples/LocalMemcacheTest.java‎

Copy file name to clipboardExpand all lines: unittests/src/test/java/com/google/appengine/samples/LocalMemcacheTest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
// [END imports]
3232

3333
// [START NameAndHelper]
34-
public class LocalMemcacheTest {
34+
public class LocalMemcacheTest extends BaseTestConfiguration {
3535

3636
private final LocalServiceTestHelper helper =
3737
new LocalServiceTestHelper(new LocalMemcacheServiceTestConfig());
Collapse file

‎unittests/src/test/java/com/google/appengine/samples/LocalUrlFetchTest.java‎

Copy file name to clipboardExpand all lines: unittests/src/test/java/com/google/appengine/samples/LocalUrlFetchTest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import org.junit.Before;
3434
import org.junit.Test;
3535

36-
public class LocalUrlFetchTest {
36+
public class LocalUrlFetchTest extends BaseTestConfiguration {
3737
private final LocalServiceTestHelper helper =
3838
new LocalServiceTestHelper(new LocalURLFetchServiceTestConfig());
3939

Collapse file

‎unittests/src/test/java/com/google/appengine/samples/MyFirstTest.java‎

Copy file name to clipboardExpand all lines: unittests/src/test/java/com/google/appengine/samples/MyFirstTest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import org.junit.Test;
2424

25-
public class MyFirstTest {
25+
public class MyFirstTest extends BaseTestConfiguration {
2626
@Test
2727
public void testAddition() {
2828
assertEquals(4, 2 + 2);
Collapse file

‎unittests/src/test/java/com/google/appengine/samples/ShortTest.java‎

Copy file name to clipboardExpand all lines: unittests/src/test/java/com/google/appengine/samples/ShortTest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import org.junit.After;
3333
import org.junit.Test;
3434

35-
public class ShortTest {
35+
public class ShortTest extends BaseTestConfiguration {
3636
private LocalServiceTestHelper helper;
3737

3838
@After

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.