* Acquires a SessionState entry for the specified sessionid. If an existing entry * is found, this method reuses that entry */
| 94 | * is found, this method reuses that entry |
| 95 | */ |
| 96 | static SessionState * |
| 97 | AcquireSessionState(int sessionId, int loglevel) |
| 98 | { |
| 99 | will_be_called_count(LWLockAcquire, 1); |
| 100 | will_be_called_count(LWLockRelease, 1); |
| 101 | expect_any_count(LWLockAcquire, lock, 1); |
| 102 | expect_any_count(LWLockAcquire, mode, 1); |
| 103 | expect_any_count(LWLockRelease, lock, 1); |
| 104 | |
| 105 | /* Keep the assertions happy */ |
| 106 | gp_session_id = sessionId; |
| 107 | sessionStateInited = false; |
| 108 | MySessionState = NULL; |
| 109 | |
| 110 | EXPECT_EREPORT(loglevel); |
| 111 | SessionState_Init(); |
| 112 | return (SessionState *) MySessionState; |
| 113 | } |
| 114 | |
| 115 | /* Releases a SessionState entry for the specified sessionId */ |
| 116 | static void |
no test coverage detected