Přidány časové limity pro testování vzdálených služeb (1 vteřina).
1.1 --- a/java/nekurak.net-ejb/test/cz/frantovo/nekurak/ext/GeoTest.java Tue May 25 17:16:36 2010 +0200
1.2 +++ b/java/nekurak.net-ejb/test/cz/frantovo/nekurak/ext/GeoTest.java Tue May 25 17:22:31 2010 +0200
1.3 @@ -11,24 +11,25 @@
1.4 public class GeoTest {
1.5
1.6 private Geo geo = new Geo();
1.7 + private static final int CASOVY_LIMIT = 1000;
1.8
1.9 - @Test
1.10 + @Test(timeout = CASOVY_LIMIT)
1.11 public void praha() {
1.12 testuj("Praha, Czech Republic", 50.0878114, 14.4204598);
1.13 }
1.14
1.15 - @Test
1.16 + @Test(timeout = CASOVY_LIMIT)
1.17 public void sanghaj() {
1.18 // https://frantovo.cz/blog/?q=cina-sanghaj-mesto-lide :-)
1.19 testuj("Shanghai, China", 31.230708, 121.472916);
1.20 }
1.21
1.22 - @Test
1.23 + @Test(timeout = CASOVY_LIMIT)
1.24 public void dallas() {
1.25 testuj("Dallas, TX", 32.802955, -96.769923);
1.26 }
1.27
1.28 - @Test
1.29 + @Test(timeout = CASOVY_LIMIT)
1.30 public void moskva() {
1.31 testuj("Moscow, Russia", 55.755786, 37.617633);
1.32 }
2.1 --- a/java/nekurak.net-ejb/test/cz/frantovo/nekurak/ext/TexyTest.java Tue May 25 17:16:36 2010 +0200
2.2 +++ b/java/nekurak.net-ejb/test/cz/frantovo/nekurak/ext/TexyTest.java Tue May 25 17:22:31 2010 +0200
2.3 @@ -12,14 +12,15 @@
2.4 public class TexyTest {
2.5
2.6 private Texy texy = new Texy();
2.7 + private static final int CASOVY_LIMIT = 1000;
2.8
2.9 - @Test
2.10 + @Test(timeout = CASOVY_LIMIT)
2.11 public void prostyText() {
2.12 testuj("", "");
2.13 testuj("ahoj", "<p>ahoj</p>");
2.14 }
2.15
2.16 - @Test
2.17 + @Test(timeout = CASOVY_LIMIT)
2.18 public void nadpisy() {
2.19 testuj("===Nadpis===", "<h1>Nadpis</h1>");
2.20 }