Permalink
Browse files

test: yet another rename to use "lsn" not "location" in Pg10. (#822)

Related postgres commit: postgres/postgres@d10c626
  • Loading branch information...
jorsol authored and davecramer committed May 16, 2017
1 parent 88942b5 commit 902286212df19b1eda9310c4174756786ad249c7
@@ -424,19 +424,23 @@ public void testStatusCanBeSentToBackendAsynchronously() throws Exception {
}

private LogSequenceNumber getSentLocationOnView() throws Exception {
return getLSNFromView("sent_location");
return getLSNFromView((((BaseConnection) sqlConnection).haveMinimumServerVersion(ServerVersion.v10)
? "sent_lsn" : "sent_location"));
}

private LogSequenceNumber getWriteLocationOnView() throws Exception {
return getLSNFromView("write_location");
return getLSNFromView((((BaseConnection) sqlConnection).haveMinimumServerVersion(ServerVersion.v10)
? "write_lsn" : "write_location"));
}

private LogSequenceNumber getFlushLocationOnView() throws Exception {
return getLSNFromView("flush_location");
return getLSNFromView((((BaseConnection) sqlConnection).haveMinimumServerVersion(ServerVersion.v10)
? "flush_lsn" : "flush_location"));
}

private LogSequenceNumber getReplayLocationOnView() throws Exception {
return getLSNFromView("replay_location");
return getLSNFromView((((BaseConnection) sqlConnection).haveMinimumServerVersion(ServerVersion.v10)
? "replay_lsn" : "replay_location"));
}

private List<String> receiveMessageWithoutBlock(PGReplicationStream stream, int count)
@@ -506,7 +510,7 @@ private LogSequenceNumber getCurrentLSN() throws SQLException {
try {
rs = st.executeQuery("select "
+ (((BaseConnection) sqlConnection).haveMinimumServerVersion(ServerVersion.v10)
? "pg_current_wal_location()" : "pg_current_xlog_location()"));
? "pg_current_wal_lsn()" : "pg_current_xlog_location()"));

if (rs.next()) {
String lsn = rs.getString(1);
@@ -930,7 +930,7 @@ private LogSequenceNumber getCurrentLSN() throws SQLException {
try {
rs = st.executeQuery("select "
+ (((BaseConnection) sqlConnection).haveMinimumServerVersion(ServerVersion.v10)
? "pg_current_wal_location()" : "pg_current_xlog_location()"));
? "pg_current_wal_lsn()" : "pg_current_xlog_location()"));

if (rs.next()) {
String lsn = rs.getString(1);
@@ -279,7 +279,7 @@ private LogSequenceNumber getCurrentLSN() throws SQLException {
try {
rs = st.executeQuery("select "
+ (((BaseConnection) sqlConnection).haveMinimumServerVersion(ServerVersion.v10)
? "pg_current_wal_location()" : "pg_current_xlog_location()"));
? "pg_current_wal_lsn()" : "pg_current_xlog_location()"));

if (rs.next()) {
String lsn = rs.getString(1);
@@ -182,7 +182,7 @@ private LogSequenceNumber getCurrentLSN() throws SQLException {
try {
rs = st.executeQuery("select "
+ (((BaseConnection) sqlConnection).haveMinimumServerVersion(ServerVersion.v10)
? "pg_current_wal_location()" : "pg_current_xlog_location()"));
? "pg_current_wal_lsn()" : "pg_current_xlog_location()"));

if (rs.next()) {
String lsn = rs.getString(1);

0 comments on commit 9022862

Please sign in to comment.