Project

General

Profile

« Previous | Next » 

Revision 9366

Added by Jing Tao about 9 years ago

Change the text content for the testing.

View differences:

test/edu/ucsb/nceas/metacat/dataone/CNodeServiceTest.java
338 338
			assertTrue(rightsHolder.equals(sysmeta.getRightsHolder()));
339 339
			
340 340
        } catch(Exception e) {
341
            e.printStackTrace();
341 342
            if(e instanceof ServiceFailure) {
342
                assertTrue(e.getMessage().contains("Couldn't determine the version"));
343
                assertTrue(e.getMessage().contains("Couldn't determine the authoritative member node"));
343 344
            } else {
344 345
                fail("Unexpected error: " + e.getMessage());
345 346
            }
......
374 375
			result = CNodeService.getInstance(request).isAuthorized(session, guid, Permission.WRITE);
375 376
			assertTrue(result);
376 377
        } catch(Exception e) {
378
            e.printStackTrace();
377 379
            if(e instanceof ServiceFailure) {
378
                assertTrue(e.getMessage().contains("Couldn't determine the version"));
380
                assertTrue(e.getMessage().contains("Couldn't determine the authoritative member node"));
379 381
            } else {
380 382
                fail("Unexpected error: " + e.getMessage());
381 383
            }
......
444 446
			assertEquals(policy.getPreferredMemberNode(0).getValue(), sysmeta.getReplicationPolicy().getPreferredMemberNode(0).getValue());
445 447
			
446 448
        } catch(Exception e) {
449
            e.printStackTrace();
447 450
            if(e instanceof ServiceFailure) {
448
                assertTrue(e.getMessage().contains("Couldn't determine the version"));
451
                assertTrue(e.getMessage().contains("Couldn't determine the authoritative member node"));
449 452
            } else {
450 453
                fail("Unexpected error: " + e.getMessage());
451 454
            }
......
1455 1458
      try {
1456 1459
          CNodeService.getInstance(request).archive(session, guid);
1457 1460
      } catch (Exception e) {
1461
         e.printStackTrace();
1458 1462
         if(e instanceof ServiceFailure) {
1459
          assertTrue(e.getMessage().contains("Couldn't determine the version"));
1463
          assertTrue(e.getMessage().contains("Couldn't determine the authoritative member node"));
1460 1464
        } else {
1461 1465
          fail("Unexpected error: " + e.getMessage());
1462 1466
        }

Also available in: Unified diff