11#!/usr/bin/env python
2- # Copyright (c ) 2016 IBM. All rights reserved.
2+ # Copyright (C ) 2016, 2018 IBM Corp . All rights reserved.
33#
44# Licensed under the Apache License, Version 2.0 (the "License");
55# you may not use this file except in compliance with the License.
@@ -467,7 +467,7 @@ def test_stale_ok(self):
467467 try :
468468 self .view001 (stale = 'ok' )
469469 except Exception as err :
470- self .assertFail ( str ( err ), 'An unexpected error was encountered.' )
470+ self .fail ( 'An unexpected error was encountered: ' + str ( err ) )
471471
472472 def test_stale_update_after (self ):
473473 """
@@ -480,8 +480,48 @@ def test_stale_update_after(self):
480480 try :
481481 self .view001 (stale = 'update_after' )
482482 except Exception as err :
483- self .assertFail (str (err ), 'An unexpected error was encountered.' )
483+ self .fail ('An unexpected error was encountered:' + str (err ))
484+
485+ def test_stable_true (self ):
486+ """
487+ Test view query using the stable parameter set to true
488+
489+
490+ Since there is no way to know whether the view will return a response from a stable set of
491+ shards or not the test here focuses on ensuring that the call itself is successful.
492+
493+ """
494+ try :
495+ self .view001 (stable = True )
496+ except Exception as err :
497+ self .fail ('An unexpected error was encountered: ' + str (err ))
498+
499+ def test_stable_update_lazy (self ):
500+ """
501+ Test view query using the update parameter set to lazy
484502
503+ Since there is no way to know whether the view will update lazily or not the test here
504+ focuses on ensuring that the call itself is successful.
505+
506+ """
507+ try :
508+ self .view001 (update = 'lazy' )
509+ except Exception as err :
510+ self .fail ('An unexpected error was encountered: ' + str (err ))
511+
512+ def test_stable_update_true (self ):
513+ """
514+ Test view query using the update parameter set to true
515+
516+ Since there is no way to know whether the view will update or not the test here focuses on
517+ ensuring that the call itself is successful.
518+
519+ """
520+ try :
521+ self .view001 (update = 'true' )
522+ except Exception as err :
523+ self .fail ('An unexpected error was encountered: ' + str (err ))
524+
485525 def test_startkey_int (self ):
486526 """
487527 Test view query using startkey parameter as an integer.
0 commit comments