This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Type: AWS::DynamoDB::Table | |
Properties: | |
TableName: Notifications | |
AttributeDefinitions: | |
- AttributeName: AccountID | |
AttributeType: B | |
- AttributeName: NotificationID | |
AttributeType: B | |
KeySchema: | |
- AttributeName: AccountID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2024-06-09 08:32:49,714 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.15.52 Python/3.11.8 Linux/6.8.0-35-generic exe/x86_64.ubuntu.24 | |
2024-06-09 08:32:49,714 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['cloudformation', 'deploy', '--template-file', './cloudformation/packaged/datastore.yaml', '--s3-bucket', 's3-000000000000', '--stack-name', 'datastore', '--profile', 'local', '--debug'] | |
2024-06-09 08:32:49,725 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_s3 at 0x783688930fe0> | |
2024-06-09 08:32:49,725 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_ddb at 0x783688e58900> | |
2024-06-09 08:32:49,726 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.configure.configure.ConfigureCommand'>> | |
2024-06-09 08:32:49,726 - MainThread - botocore.hooks - DEBUG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.junit.jupiter.api.Test | |
class SingletonTest { | |
@Test | |
fun testSingleton() { | |
val firstDatabase = DatabaseSingleton.database() | |
val secondDatabase = DatabaseSingleton.database() | |
assert(firstDatabase == secondDatabase) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object DatabaseSingleton { | |
private var isConnected: Boolean = false | |
init { | |
println("Connecting to database...") | |
isConnected = true | |
} | |
fun database(): DatabaseSingleton { |