Fixes for probe tests
Updated the imports and added a head_account to the "is the cluster started yet?" checks. Hopefully this fixes the notorious timing issues of these tests where auth answers requests just a bit before the rest of the cluster is ready. Fixes bug 1014931 Change-Id: Iea1d62db2317560371da49af5e94a0279b646294
This commit is contained in:
parent
67af56b156
commit
be79b0884e
@ -19,7 +19,7 @@ from subprocess import call, Popen
|
|||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
from swift.common.bufferedhttp import http_connect_raw as http_connect
|
from swift.common.bufferedhttp import http_connect_raw as http_connect
|
||||||
from swiftclient import get_auth
|
from swiftclient import get_auth, head_account
|
||||||
from swift.common.ring import Ring
|
from swift.common.ring import Ring
|
||||||
|
|
||||||
|
|
||||||
@ -54,6 +54,7 @@ def reset_environment():
|
|||||||
url, token = get_auth('http://127.0.0.1:8080/auth/v1.0',
|
url, token = get_auth('http://127.0.0.1:8080/auth/v1.0',
|
||||||
'test:tester', 'testing')
|
'test:tester', 'testing')
|
||||||
account = url.split('/')[-1]
|
account = url.split('/')[-1]
|
||||||
|
head_account(url, token)
|
||||||
break
|
break
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
if attempt > 9:
|
if attempt > 9:
|
||||||
|
@ -20,7 +20,8 @@ from signal import SIGTERM
|
|||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
from swift.common import client, direct_client
|
from swiftclient import client
|
||||||
|
from swift.common import direct_client
|
||||||
from test.probe.common import get_to_final_state, kill_pids, reset_environment
|
from test.probe.common import get_to_final_state, kill_pids, reset_environment
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ from uuid import uuid4
|
|||||||
import eventlet
|
import eventlet
|
||||||
import sqlite3
|
import sqlite3
|
||||||
|
|
||||||
from swift.common import client, direct_client
|
from swiftclient import client
|
||||||
|
from swift.common import direct_client
|
||||||
from swift.common.utils import hash_path, readconf
|
from swift.common.utils import hash_path, readconf
|
||||||
|
|
||||||
from test.probe.common import get_to_final_state, kill_pids, reset_environment
|
from test.probe.common import get_to_final_state, kill_pids, reset_environment
|
||||||
|
@ -21,7 +21,8 @@ from subprocess import Popen
|
|||||||
from time import sleep
|
from time import sleep
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
from swift.common import client, direct_client
|
from swiftclient import client
|
||||||
|
from swift.common import direct_client
|
||||||
|
|
||||||
from test.probe.common import kill_pids, reset_environment
|
from test.probe.common import kill_pids, reset_environment
|
||||||
|
|
||||||
|
@ -18,7 +18,8 @@ import unittest
|
|||||||
import os
|
import os
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
from swift.common import client, direct_client
|
from swiftclient import client
|
||||||
|
from swift.common import direct_client
|
||||||
from swift.common.utils import hash_path, readconf
|
from swift.common.utils import hash_path, readconf
|
||||||
from swift.obj.server import write_metadata, read_metadata
|
from swift.obj.server import write_metadata, read_metadata
|
||||||
from test.probe.common import kill_pids, reset_environment
|
from test.probe.common import kill_pids, reset_environment
|
||||||
|
@ -21,7 +21,8 @@ from subprocess import call, Popen
|
|||||||
from time import sleep
|
from time import sleep
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
from swift.common import client, direct_client
|
from swiftclient import client
|
||||||
|
from swift.common import direct_client
|
||||||
|
|
||||||
from test.probe.common import kill_pids, reset_environment
|
from test.probe.common import kill_pids, reset_environment
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ from signal import SIGTERM
|
|||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
from swift.common import client
|
from swiftclient import client
|
||||||
|
|
||||||
from test.probe.common import get_to_final_state, kill_pids, reset_environment
|
from test.probe.common import get_to_final_state, kill_pids, reset_environment
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user