41
41
import static org .apache .hadoop .ozone .OzoneConfigKeys .OZONE_ADMINISTRATORS ;
42
42
import static org .apache .hadoop .ozone .OzoneConfigKeys .OZONE_ADMINISTRATORS_WILDCARD ;
43
43
import static org .apache .hadoop .ozone .OzoneConfigKeys .OZONE_OPEN_KEY_EXPIRE_THRESHOLD_SECONDS ;
44
- import org .junit .After ;
44
+ import org .junit .AfterClass ;
45
45
import org .junit .Assert ;
46
46
import static org .junit .Assert .fail ;
47
- import org .junit .Before ;
48
- import org .junit .Ignore ;
47
+ import org .junit .BeforeClass ;
49
48
import org .junit .Rule ;
50
49
import org .junit .Test ;
51
50
import org .junit .rules .Timeout ;
54
53
* Test some client operations after cluster starts. And perform restart and
55
54
* then performs client operations and check the behavior is expected or not.
56
55
*/
57
- @ Ignore
58
56
public class TestOzoneManagerRestart {
59
- private MiniOzoneCluster cluster = null ;
60
- private OzoneConfiguration conf ;
61
- private String clusterId ;
62
- private String scmId ;
63
- private String omId ;
57
+ private static MiniOzoneCluster cluster = null ;
58
+ private static OzoneConfiguration conf ;
59
+ private static String clusterId ;
60
+ private static String scmId ;
61
+ private static String omId ;
64
62
65
63
@ Rule
66
- public Timeout timeout = new Timeout (60000 );
64
+ public Timeout timeout = new Timeout (240000 );
67
65
68
66
/**
69
67
* Create a MiniDFSCluster for testing.
@@ -72,8 +70,8 @@ public class TestOzoneManagerRestart {
72
70
*
73
71
* @throws IOException
74
72
*/
75
- @ Before
76
- public void init () throws Exception {
73
+ @ BeforeClass
74
+ public static void init () throws Exception {
77
75
conf = new OzoneConfiguration ();
78
76
clusterId = UUID .randomUUID ().toString ();
79
77
scmId = UUID .randomUUID ().toString ();
@@ -94,8 +92,8 @@ public void init() throws Exception {
94
92
/**
95
93
* Shutdown MiniDFSCluster.
96
94
*/
97
- @ After
98
- public void shutdown () {
95
+ @ AfterClass
96
+ public static void shutdown () {
99
97
if (cluster != null ) {
100
98
cluster .shutdown ();
101
99
}
0 commit comments