gluu
静的公開メンバ関数 | 静的公開変数類 | 静的非公開メンバ関数 | 静的非公開変数類 | 全メンバ一覧
org.xdi.oxd.server.SetUpTest クラス
org.xdi.oxd.server.SetUpTest 連携図
Collaboration graph

静的公開メンバ関数

static void beforeSuite (String host, String opHost, String redirectUrl)
 
static void afterSuite ()
 

静的公開変数類

static DropwizardTestSupport< OxdServerConfigurationSUPPORT = null
 

静的非公開メンバ関数

static void removeExistingRps ()
 

静的非公開変数類

static final Logger LOG = LoggerFactory.getLogger(SetUpTest.class)
 

詳解

Main class to set up and tear down suite.

著者
Yuriy Zabrovarnyy
バージョン
0.9, 21/08/2013

関数詳解

◆ afterSuite()

static void org.xdi.oxd.server.SetUpTest.afterSuite ( )
inlinestatic
73  {
74  try {
75  LOG.debug("Starting afterSuite ...");
76  Thread.sleep(25 * 1000); // hack: need to investigate why after suite is called before actual suite is finished
77  LOG.debug("Running afterSuite ...");
78  SUPPORT.after();
79  ServerLauncher.shutdown(false);
80  LOG.debug("HTTP server is successfully stopped.");
81  } catch (Exception e) {
82  LOG.error("Failed to stop HTTP server.", e);
83  }
84  }
static DropwizardTestSupport< OxdServerConfiguration > SUPPORT
Definition: SetUpTest.java:27
static final Logger LOG
Definition: SetUpTest.java:25

◆ beforeSuite()

static void org.xdi.oxd.server.SetUpTest.beforeSuite ( String  host,
String  opHost,
String  redirectUrl 
)
inlinestatic
32  {
33  try {
34  LOG.debug("Running beforeSuite ...");
35  ServerLauncher.setSetUpSuite(true);
36 
37  SUPPORT = new DropwizardTestSupport<OxdServerConfiguration>(OxdServerApplication.class,
38  ResourceHelpers.resourceFilePath("oxd-server-jenkins.yml"),
39  ConfigOverride.config("server.applicationConnectors[0].port", "0") // Optional, if not using a separate testing-specific configuration file, use a randomly selected port
40  );
41  SUPPORT.before();
42  LOG.debug("HTTP server started.");
43 
45  LOG.debug("Existing RPs are removed.");
46 
47  SetupClientResponse setupClient = SetupClientTest.setupClient(Tester.newClient(host), opHost, redirectUrl);
48  Tester.setSetupClient(setupClient, host, opHost);
49  LOG.debug("SETUP_CLIENT is set in Tester.");
50 
51  Preconditions.checkNotNull(Tester.getAuthorization());
52  LOG.debug("Tester's authorization is set.");
53 
54  LOG.debug("Finished beforeSuite!");
55  } catch (Exception e) {
56  LOG.error("Failed to start suite.", e);
57  throw new AssertionError("Failed to start suite.");
58  }
59  }
static DropwizardTestSupport< OxdServerConfiguration > SUPPORT
Definition: SetUpTest.java:27
static final Logger LOG
Definition: SetUpTest.java:25
static void removeExistingRps()
Definition: SetUpTest.java:61

◆ removeExistingRps()

static void org.xdi.oxd.server.SetUpTest.removeExistingRps ( )
inlinestaticprivate
61  {
62  try {
63  ServerLauncher.getInjector().getInstance(PersistenceService.class).create();
64  ServerLauncher.getInjector().getInstance(RpService.class).removeAllRps();
65  ServerLauncher.getInjector().getInstance(RpService.class).load();
66  LOG.debug("Finished removeExistingRps successfullly.");
67  } catch (Exception e) {
68  LOG.error("Failed to removed existing RPs.", e);
69  }
70  }
static final Logger LOG
Definition: SetUpTest.java:25

メンバ詳解

◆ LOG

final Logger org.xdi.oxd.server.SetUpTest.LOG = LoggerFactory.getLogger(SetUpTest.class)
staticprivate

◆ SUPPORT

DropwizardTestSupport<OxdServerConfiguration> org.xdi.oxd.server.SetUpTest.SUPPORT = null
static

このクラス詳解は次のファイルから抽出されました: