Package: ciftools-java / 7.0.1-1~exp1

deactivate_tests_using_network.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Description: omit tests that try to use the network
 Also adding junit-jupiter-engine in the pom, so that @Disabled annotations
 are taken into account.
Author: Pierre Gruet <pgt@debian.org>
Forwarded: not-needed
Last-Update: 2021-10-17

--- a/src/test/java/org/rcsb/cif/CifOptionsTest.java
+++ b/src/test/java/org/rcsb/cif/CifOptionsTest.java
@@ -1,5 +1,6 @@
 package org.rcsb.cif;
 
+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.rcsb.cif.binary.codec.MessagePackCodec;
 import org.rcsb.cif.model.CifFile;
@@ -76,6 +77,7 @@
         assertEquals(encoderName, map.get("encoder"));
     }
 
+    @Disabled("attempts to use the network")
     @Test
     void testFetchUrlText() throws IOException {
         // by switching to RCSB cif files, the implementation type should be text
@@ -84,6 +86,7 @@
         assertTrue(cifFile instanceof TextFile);
     }
 
+    @Disabled("attempts to use the network")
     @Test
     void testFetchUrlBinary() throws IOException {
         // by switching to RCSB bcif files, the implementation type should be binary
@@ -191,4 +194,4 @@
         // magic number must not be gzip
         assertNotEquals(GZIPInputStream.GZIP_MAGIC, (text[0] & 0xff | ((text[1] << 8) & 0xff00)));
     }
-}
\ No newline at end of file
+}
--- a/src/test/java/org/rcsb/cif/DemoTest.java
+++ b/src/test/java/org/rcsb/cif/DemoTest.java
@@ -1,5 +1,6 @@
 package org.rcsb.cif;
 
+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
 import java.io.IOException;
@@ -8,6 +9,7 @@
  * Ensure that the provided Demo is actually running.
  */
 class DemoTest {
+    @Disabled("Attempts to use the network")
     @Test
     void testDemo() throws IOException {
         Demo.main(new String[0]);
--- a/pom.xml
+++ b/pom.xml
@@ -55,6 +55,12 @@
         </dependency>
 
         <!-- test dependencies -->
+         <dependency>
+             <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+            <version>debian</version>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>org.junit.jupiter</groupId>
             <artifactId>junit-jupiter-api</artifactId>
@@ -175,4 +181,4 @@
             </build>
         </profile>
     </profiles>
-</project>
\ No newline at end of file
+</project>
--- a/src/test/java/org/rcsb/cif/IntegrationTest.java
+++ b/src/test/java/org/rcsb/cif/IntegrationTest.java
@@ -1,5 +1,6 @@
 package org.rcsb.cif;
 
+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.rcsb.cif.model.Category;
 import org.rcsb.cif.model.CifFile;
@@ -311,6 +312,7 @@
     /**
      * BinaryCIF might slightly violate the schema and lead to a ClassCastException if not handled.
      */
+    @Disabled("Attempts to use the network")
     @Test
     void readRcsbAndEbiGeneric() throws IOException {
         CifFile rcsb = CifIO.readFromInputStream(TestHelper.getInputStream("bcif/1acj.bcif"));
@@ -326,6 +328,7 @@
         assertEquals(83, ebiNdbSeqNum.getRowCount());
     }
 
+    @Disabled("Attempts to use the network")
     @Test
     void readRcsbAndEbiWithSchema() throws IOException {
         MmCifFile rcsb = CifIO.readFromInputStream(TestHelper.getInputStream("bcif/1acj.bcif")).as(StandardSchemata.MMCIF);