Skip to content

Commit

Permalink
Rebase with master
Browse files Browse the repository at this point in the history
  • Loading branch information
jshaughn committed Jan 21, 2016
1 parent 0cfb21f commit 22dff0e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ public void updateTriggerEnablement(String tenantId, String triggerId, boolean e
return;
}

session = CassCluster.getSession();
Session session = CassCluster.getSession();
PreparedStatement updateTriggerEnabled = CassStatement.get(session, CassStatement.UPDATE_TRIGGER_ENABLED);
if (updateTriggerEnabled == null) {
throw new RuntimeException("updateTriggerEnabled PreparedStatement is null");
Expand All @@ -525,7 +525,7 @@ public void updateTriggerEnablement(String tenantId, String triggerId, boolean e
throw e;
}

if (initialized && null != alertsEngine) {
if (alertsContext.isInitialized() && null != alertsEngine) {
alertsEngine.reloadTrigger(tenantId, triggerId);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Red Hat, Inc. and/or its affiliates
* Copyright 2015-2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -41,7 +41,6 @@ public class CassPersistenceTest extends PersistenceTest {
private static final String JBOSS_DATA_DIR = "jboss.server.data.dir";
private static final String EXTERNAL_CASSANDRA = "external_cassandra";

static Session session;
static boolean externalCassandra;
static String keyspace;

Expand All @@ -62,14 +61,15 @@ public static void initSessionAndResetTestSchema() throws Exception {

keyspace = AlertProperties.getProperty("hawkular-alerts.cassandra-keyspace", "hawkular_alerts_test");

// try an clean up if this was somehow left around by a prior run
Session session = CassCluster.getSession();

// try and clean up if this was somehow left around by a prior run
try {
session.execute("DROP KEYSPACE " + keyspace);
} catch (Throwable t) {
// never mind, it may not be there
}

session = CassCluster.getSession();
definitionsService = StandaloneAlerts.getDefinitionsService();
alertsService = StandaloneAlerts.getAlertsService();
actionsService = StandaloneAlerts.getActionsService();
Expand All @@ -80,6 +80,7 @@ public static void cleanTestSchema() throws Exception {

// try an clean up
try {
Session session = CassCluster.getSession();
session.execute("DROP KEYSPACE " + keyspace);
if (!externalCassandra) {
System.out.print("Stopping embedded Cassandra for unit testing...");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@
"trigger":{
"tenantId": "28026b36-8fe4-4332-84c8-524e173a68bf",
"id": "trigger-7",
"type": "GROUP",
"enabled": true,
"name": "Parent-NumericData-Token-low",
"description": "description 8",
"severity": "HIGH",
"group": true,
"actions": {
"email": ["email-to-admin"]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@
"trigger":{
"tenantId": "28026b36-8fe4-4332-84c8-524e173a68bf",
"id": "trigger-7",
"type": "GROUP",
"enabled": true,
"name": "Parent-NumericData-Token-low",
"description": "description 8",
"severity": "HIGH",
"group": true,
"actions": {
"email": ["email-to-admin"]
}
Expand Down

0 comments on commit 22dff0e

Please sign in to comment.