Skip to content

Commit

Permalink
Removed the failure on init test as it may have been causing seg faul…
Browse files Browse the repository at this point in the history
…ts in some tests.
  • Loading branch information
hicklin committed Jul 7, 2023
1 parent 2d6f26a commit 2d4cca0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/app/tests/TestAttributePersistenceProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,13 @@ void TestStorageAndRetrivalByteSpans(nlTestSuite * inSuite, void * inContext)
TestPersistentStorageDelegate storageDelegate;
DefaultAttributePersistenceProvider persistenceProvider;

// Failure before Init
uint8_t valueArray[1] = { 0x42 };
ByteSpan value(valueArray);
CHIP_ERROR err = persistenceProvider.WriteValue(TestConcretePath, value);
NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE);

// Init
err = persistenceProvider.Init(&storageDelegate);
ChipError err = persistenceProvider.Init(&storageDelegate);
NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);

// Store ByteSpan of size 1
uint8_t valueArray[1] = { 0x42 };
ByteSpan value(valueArray);
err = persistenceProvider.WriteValue(TestConcretePath, value);
NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);

Expand Down

0 comments on commit 2d4cca0

Please sign in to comment.