Skip to content

Commit

Permalink
#226 fix formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Chandler committed Oct 24, 2023
1 parent 9b32d6d commit e429582
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public String getOperationString()
{
return operationString;
}

@Override
public String getNakedOperationString()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public void setup()
@Override
public boolean shouldLogPrepareStatements() { return true; }


/**
* Returns true if the supplied log entry's role or any other role granted to it (directly or indirectly) is
* white-listed for the log entry's specified operations and resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ public void setup()
yamlFilter.setup();
roleFilter.setup();
}

@Override
public boolean shouldLogPrepareStatements()
{
return yamlFilter.shouldLogPrepareStatements();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ public void testPrepareAndGetPreparedWhenPreloaded()
verify(mockHandler, times(1)).prepare(eq(query), eq(mockQueryState), eq(customPayload));
verify(mockHandler, times(1)).getPrepared(eq(statementId));
verify(mockAdapter, times(1)).auditPrepare(eq(query), eq(mockClientState), eq(Status.ATTEMPT), longThat(isCloseToNow()));

}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import ch.qos.logback.core.Appender;
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.PreparedStatement;

import com.datastax.driver.core.Session;
import com.datastax.driver.core.SimpleStatement;
import com.datastax.driver.core.exceptions.InvalidQueryException;
Expand Down Expand Up @@ -93,6 +92,7 @@ public static void afterClass()
session.close();
cluster.close();
}

@Test
public void testPrepareStatement()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void testFailedPrepareStatement()
assertThat(getLogEntries()).containsOnly( "client:'127.0.0.1'|user:'anonymous'|status:'ATTEMPT'|operation:'Prepared: INSERT INTO school.invalidestudents (key, value) VALUES (?, ?)'",
"client:'127.0.0.1'|user:'anonymous'|status:'FAILED'|operation:'Prepared: INSERT INTO school.invalidestudents (key, value) VALUES (?, ?)'");
}

private void givenTable(String keyspace, String table)
{
session.execute("CREATE KEYSPACE IF NOT EXISTS " + keyspace + " WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : 1} AND DURABLE_WRITES = false");
Expand Down

0 comments on commit e429582

Please sign in to comment.